Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
820
igHierarchicalGrid and subtotals
posted

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

Parents
  • 15320
    Offline posted

    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

    GroupingWithSummaries.zip
Reply Children