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?