Author Topic: Group Summary with Detail Grids?  (Read 2668 times)

wmwa

  • Pro Economy
  • Newbie
  • *
  • Posts: 19
    • View Profile
Group Summary with Detail Grids?
« on: May 05, 2015, 09:32:50 pm »
Is there anything that would prevent a group summary from working when there is also a detailModel defined?

I have the "summary" option set in the colModel for a column with dataType "float", and initially the grid displays with no grouping active. When a user clicks on a header cell, I change the groupModel to group by that dataIndx, but then the previously defined summary does not appear.

It seems that the summary can survive through the groupModel changing, as the "Row Grouping" demo has a button to turn it on and off, but I'm getting nothing.

I haven't tried removing the detailModel yet, but I'm wondering if that might be causing problems?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6282
    • View Profile
Re: Group Summary with Detail Grids?
« Reply #1 on: May 06, 2015, 10:58:54 am »
As summary is a column property, I don't see any reason that it won't work with toggle or change of groupModel. Please share a jsfiddle implementation so that I can have a look into your implementation.

There is already a demo http://paramquery.com/pro/demos/group_rows to follow.

I've added one more demo for use of detailModel with groupModel. They are compatible with each other and there are no special considerations.

http://paramquery.com/pro/demos/detail_group
« Last Edit: May 06, 2015, 12:56:09 pm by paramquery »

wmwa

  • Pro Economy
  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Group Summary with Detail Grids?
« Reply #2 on: May 06, 2015, 07:49:57 pm »
Sorry, it was my mistake.

I was sending the parameters for the summary as strings {type: "sum"} instead of a single string inside of an array. {type: ["sum"]}

Works now, thanks. :)