ejGrid Summary

I have an ejGrid with a summary.
It does not seem to allow me to format a column that brings in doubles to "{0:0:00}"
what should I do to establish total sums to the hundredth place on summary rows and total summary row?

3 Replies

SE Sathyanarayanamoorthy Eswararao Syncfusion Team January 18, 2018 12:55 PM UTC

Hi Nicholas, 

Thanks for contacting Syncfusion support. 

Query 1: It does not seem to allow me to format a column that brings in doubles to "{0:0:00}" 
 
We have analyzed the query and found that you want to set the format for the column based on two decimal point. We have inbuilt support to set the format using the format property of the column in grid. 
 
Refer the blow code example. 
 

 
$("#Grid").ejGrid({ 
    /// the datasource "window.gridData" is referred from jsondata.min.js 
    dataSource: data, 
                allowPaging: true, 
              showSummary: true, 
                pageSettings: { pageSize: 10 }, 
                summaryRows: [ 
                    { title: "Sum", summaryColumns: [{ summaryType: ej.Grid.SummaryType.Sum, displayColumn: "Freight", dataMember: "Freight", format: "{0:N2}" }] }, 
                             ], 
                columns: [ 
                         { field: "ID", headerText: "ID", width: 90 }, 
                  { field: "Freight", headerText: "Freight", width: 110,format: "{0:N2}" }, 
                         ] 
            }); 
        }); 
 
    
We have prepared a Js Playground sample for your reference and the same can be found below. 


Refer the following documentation for format details. 





Query 2: what should I do to establish total sums to the hundredth place on summary rows and total summary row? 
 
We have checked the query and we are quite unclear regarding this requirement. So please provide the following details. 
 
  1. Share the Pictorial representation of your requirement.
  2. Share the Syncfusion Essential studio version.
  3. Code example of the grid.
  4. Share the exact scenario of your requirement.  
 
The provided details will help us to analyze the issue and provide the solution as soon as possible. 
 
Regards, 
Sathyanarayanamoorthy 




BE Becky February 6, 2018 01:42 PM UTC

Thank you. It worked. I missed that 


SE Sathyanarayanamoorthy Eswararao Syncfusion Team February 7, 2018 03:20 AM UTC

Hi Nicholas, 

We are happy to hear that your issue has been solved. 
If you need any further assistance please get back to us. 

Regards, 
Sathyanarayanamoorthy 


Loader.
Up arrow icon