Author Topic: Updating Summary Data  (Read 2524 times)

SureshB

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 32
    • View Profile
Updating Summary Data
« on: February 11, 2016, 07:01:42 pm »
Hi

I have two grids loading at a time. after loading of first grid, with that grid summary data,  I need to update the summary of second table by performing some calculations.
is this done in which way? Please let me know the correct way i can follow.

Thank you.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: Updating Summary Data
« Reply #1 on: February 12, 2016, 09:25:40 am »
There is no hard and fast rule as such. As you said summary data in second grid is dependent upon summary data in first grid. So you call createTable() for 2nd grid  after you have the summary data of first grid + main data of 1st grid.

So in term of events of 2nd grid:

1) Listen to 1st ( http://paramquery.com/pro/api#method-one ) load event ( http://paramquery.com/pro/api#event-load ). This would ensure data in 2nd grid is available.

2) Inside it listen to refresh event.

3) Inside the refresh event, check for availability of summary data of 1st grid.

4) Do the calculations and call createTable().

SureshB

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Updating Summary Data
« Reply #2 on: February 22, 2016, 03:01:10 pm »
Thank you very mych for the support.
I got the solution.