Author Topic: synchronizing data between 2 grids  (Read 2453 times)

alandman

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 6
    • View Profile
synchronizing data between 2 grids
« on: May 18, 2016, 08:08:06 pm »
I have a case when I need to load 2 separate grids on one page that depend on each other.
How do I make sure that data on 1 loads before the 2?
Thank you,

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: synchronizing data between 2 grids
« Reply #1 on: May 18, 2016, 10:49:21 pm »
When data is available ( load event ) in 1st grid.

1. set url of 2nd grid.

2. pass parameters from 1st grid to 2nd grid by appending them to url or setting dataModel.postDataOnce option of 2nd grid.

3. call refreshDataAndView() of 2nd grid

There is a similar master detail example for basic version: http://paramquery.com/demos/master_detail. But in this example the data in 2nd grid is loaded when a row is selected in 1st grid.
« Last Edit: May 18, 2016, 11:06:39 pm by paramquery »

alandman

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: synchronizing data between 2 grids
« Reply #2 on: May 19, 2016, 12:18:53 am »
Great, thank u