Author Topic: How to get summary Data after grouping the rows.  (Read 3119 times)

SureshB

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 32
    • View Profile
How to get summary Data after grouping the rows.
« on: August 24, 2016, 07:37:57 pm »
Hi

I have a situation that I grouped the rows with summary type Max. It is working well.

But , I need the grouped summary max value in render function of the cells for further calculations.

How can i get the grouped summary max value of a column , when even i need.

Thank you.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: How to get summary Data after grouping the rows.
« Reply #1 on: August 24, 2016, 09:47:57 pm »
That's simply available as ui.cellData inside render callback.

http://paramquery.com/pro/api#option-column-render

Also grouping adds few properties to the rows i.e., pq_gtitle, pq_gsummary, pq_grandsummary, pq_level, pq_close for easy identification of group title, summary rows and their current state in rowData, which can be used inside render callback.

http://paramquery.com/pro/api#option-groupModel

var rd = ui.rowData;
if( rd.pq_gtitle || rd.pq_gsummary ){
  //do something with ui.cellData.
}

SureshB

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: How to get summary Data after grouping the rows.
« Reply #2 on: August 25, 2016, 08:29:59 pm »
Hi ,

Is this functionality available in PQGrid 2.x?

I could not get the  rd.pq_gtitle || rd.pq_gsummary  Properties.

Thank you.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: How to get summary Data after grouping the rows.
« Reply #3 on: August 26, 2016, 10:11:45 am »
It's available in >= v3.3.0