Hi
igHierarchicalGrid allow add subtotals, when datasource looks like this:
var data = [ { ID: 1, Test: "Test1",Arr: [{ID: 1, data: "data1"}, {ID: 2, data: "data2"}, {ID: 3, data: "data3"}]}, { ID: 2,Test: "Test2",
Arr: [{ID: 1, data: "data4"}, {ID: 2, data: "data5"}, {ID: 3, data: "data6"}]
}]
But igHierarchicalGrid allow us group by some property dynamically and i need add subtotals for this case. For example we have such datasource, then group by Test property. Now we have group which contains 2 records. How i can add subtotals for them?
var data = [{ ID: 1, Test: "Test1",},{ID: 2,Test: "Test1",
Regards
Hello Aliaksey,
Thank you for posting in our community.
If I understood your requirement right, you need a Grouping feature which includes a custom information about the group (a summary). Therefore I would suggest you to take a look at the following links:
- the first one is a sample that demonstrates Grouping with Summaries: http://igniteui.com/grid/grouping
- the second one is a documentation overview of the Grouping with Summaries feature: http://ko.infragistics.com/help/jquery/igHierarchicalGrid_Grouping_with_Summaries.html#_Ref322004154
I've created also a sample with similar scenario for your reference.
Please let me know if you need any further assistance.
Sincerely,
Tsanna
Hi Tsanna.
Thanks for your answer, I investigated linked pages, but didn't found answer. Summaries in your sample don't understandable enough. I want to find a way to apply subtotals like in hierarchical data source to flat data source.