We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

DataGrid issue(aggregate column no format)

hello, I am having a problem when formatting my aggregate column C2, I apply the format C2 in the format property and it simply does not do it, in the console it does not give any type of error simply it is not formatted to C2 nor any another type

5 Replies

TS Thavasianand Sankaranarayanan Syncfusion Team August 1, 2019 02:10 AM

Hi Raul, 

Greetings from Syncfusion support. 

We have prepared a sample based on your details but we are unsuccessful to reproduce the issue from our end. 

Refer the below code example. 

[index.cshtml] 

<ejs-grid id="Grid" dataSource="ViewBag.datasource" allowPaging="true"> 
        <e-grid-aggregates> 
            <e-grid-aggregate> 
                <e-aggregate-columns> 
                    <e-aggregate-column field="Freight" type="Sum" format="C2" footerTemplate="Sum:${Sum}"></e-aggregate-column> 
                </e-aggregate-columns> 
            </e-grid-aggregate> 
            <e-grid-aggregate> 
                <e-aggregate-columns> 
                    <e-aggregate-column field="Freight" type="Average" format="C2" footerTemplate="Average:${Average}"></e-aggregate-column> 
                </e-aggregate-columns> 
            </e-grid-aggregate> 
        </e-grid-aggregates> 
        <e-grid-groupsettings></e-grid-groupsettings> 
        <e-grid-pagesettings pageCount="5"></e-grid-pagesettings> 
        <e-grid-columns> 
            <e-grid-column field="CustomerID" headerText="Customer Name" width="150"></e-grid-column> 
            <e-grid-column field="Freight" headerText="Freight" TextAlign="Right" format="C2" width="160"></e-grid-column> 
            <e-grid-column field="OrderDate" headerText="Order Date" format="yMd" width="130"></e-grid-column> 
            <e-grid-column field="ShipCity" headerText="Ship Country" width="140"></e-grid-column> 
        </e-grid-columns> 
    </ejs-grid> 



Refer the screen shot. 

 

We have prepared a simple sample and it can be downloadable from the below location. 


If you still face the same issue then provide the following details. 

  1. Share the screen shot or video demonstration of the issue.
  2. Share the complete Grid code example.
  3. If possible try to reproduce the issue in the attached sample.
  4. Share the essential studio version details.

Regards, 
Thavasianand S. 



RM Raul Montan Rodriguez August 1, 2019 07:42 AM

thanks for your answer, the example you have works, but the same thing doesn't happen to me here I show you the images with what happened



Thanks Raul


TS Thavasianand Sankaranarayanan Syncfusion Team August 1, 2019 10:28 PM

Hi Raul, 

We can’t able to see  your attachments in this forum. So, can you please re-attach your screen shots. 

Refer the screen shot. 

 

Regards, 
Thavasianand S. 



RM Raul Montan Rodriguez August 5, 2019 11:10 AM

Hi Thavasianand, Thank you for your attention, here I send the images in a zip file, it is quite strange that I could not visualize the images in the post yet I can visualize it, but so that I can visualize it without problem I compressed it in the zip

Attachment: formatC2_fd37d03a.zip


TS Thavasianand Sankaranarayanan Syncfusion Team August 6, 2019 05:49 AM

Hi Raul, 

We have validated your given screens shots. We suspect that “Facturado” column values may be string in the Grid dataSource. So, please ensure on your end for that column value. Else please provide your sample dataSource to reproduce the issue from our end. If possible please try to reproduce the issue in the previously attached sample. 

Regards, 
Thavasianand S. 


Loader.
Live Chat Icon For mobile
Up arrow icon