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
close icon

How do we do Row Summaries?

We can do column summaries, but what about row summaries?  Even better, selective columns?

Consider a grid that has file size totals broken down by how old the files are.  We want to tell the customer how much space they can save if they move all their files two years and older to a cheaper drive:

$("#enterprisefilesharesummarygrid").ejGrid({
dataSource: data,
allowPaging: true,
allowSorting: true,
allowReordering: true,
allowResizing: true,
allowFiltering: true,
enableHeaderHover: true,
filterSettings: {filterType: "Excel"},
columns: [
{field: "share_name", headerText: "Share Name", textAlign: ej.TextAlign.Center},
{field: "30 day", format: "{0:N2}", headerText: "30 Days", textAlign: ej.TextAlign.Right},
{field: "90 day", format: "{0:N2}", headerText: "90 Days", textAlign: ej.TextAlign.Right},
{field: "180 day", format: "{0:N2}", headerText: "180 Days", textAlign: ej.TextAlign.Right},
{field: "365 day", format: "{0:N2}", headerText: "365 Days", textAlign: ej.TextAlign.Right},
{field: "730 day", format: "{0:N2}", headerText: "730 Days", textAlign: ej.TextAlign.Right},
{field: "older", format: "{0:N2}", headerText: "Older", textAlign: ej.TextAlign.Right},
          ?? total column here for the row ??

]
});
So it'd be great if I could total 365 and older.  Sure, I could do that in the DB or the controller, 
but what if I gave them some sort of slider that let them set the threshold.  maybe they want to see
what the totals would look like for six months and over - i'd need to dynamically summarize the rows.
Any  tips?

2 Replies

BV Bruce Van Horn May 23, 2017 07:33 PM UTC

Nevermind - I found an example:  https://www.syncfusion.com/kb/7626/how-to-place-a-calculated-column-in-grid.



MS Mani Sankar Durai Syncfusion Team May 24, 2017 04:14 AM UTC

Hi Bruce, 

Thanks for the update. 

Please let us know if you need further assistance. 

Regards, 
Manisankar Durai. 


Loader.
Live Chat Icon For mobile
Up arrow icon