Author Topic: Auto calculate grandSummary after cell editing?  (Read 3244 times)

Kayser

  • Newbie
  • *
  • Posts: 7
    • View Profile
Auto calculate grandSummary after cell editing?
« on: June 13, 2016, 12:15:35 pm »
Hi everyone,

I use grandSummary on my grid. I have a column, data type is integer, and this is editable. I edit any cell value on this column but grandsummary, type "sum", is not change. How I auto-calculate grandsummary for this row.

And I want  to ask one more question. Grandsummary looks page's summary. Can we use all remote data grandsummary with paging?

Thanks advance.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Auto calculate grandSummary after cell editing?
« Reply #1 on: June 13, 2016, 03:01:07 pm »
1. You have to define summary: { type: 'sum' } in the column definition. Summary type can be edited only with summary cells, not with the normal content cells.

http://paramquery.com/pro/demos/group_summary

2. Auto grand summary works only for the current page. If you want to consider all pages, you have to use manual grandsummary.

grid.option( 'summaryData', array_of_objects );

Example for manual summary: http://paramquery.com/pro/demos/summary_json
« Last Edit: June 13, 2016, 03:02:59 pm by paramquery »

Kayser

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Auto calculate grandSummary after cell editing?
« Reply #2 on: June 14, 2016, 11:23:56 am »
Actually I want to make my grid like this link with remote data
http://paramquery.com/demos/summary
How can I accomplish?