Author Topic: How to get nested grid so can execute methods on it  (Read 219 times)

scoular

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 4
    • View Profile
How to get nested grid so can execute methods on it
« on: May 31, 2024, 03:14:22 am »
I am using paramquery with Angular.  Doing nested grids with local data.  Same as the Angular nested grid example. 
I get the main grid so I can manipulate it in code with @ViewChild like '@ViewChild('mainGrid') mainGrid: PqgridComponent;
Then I can do things like refresh row 'mainGrid.grid.refreshRow({ rowIndx: index })'

I need to do same with the nested grids.  How can I navigate to a nested grid in code?
I have tried getting the row and then trying to get the nested grid of that row but not seeing a way to do it.
mainGrid.grid.getRow({ rowIndx: index })


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to get nested grid so can execute methods on it
« Reply #1 on: May 31, 2024, 12:22:57 pm »
Reference to detail grid can be obtained from corresponding rowData of parent grid as

Code: [Select]
var detail_grid = $(rowData.pq_detail.child).pqGrid( 'instance' );

//now call any method on detail grid,

detail_grid.refreshRow()

or

detail_grid.updateRow()

Please let me know if you need further assistance.