ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: scoular on May 31, 2024, 03:14:22 am

Title: How to get nested grid so can execute methods on it
Post by: scoular 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 })

Title: Re: How to get nested grid so can execute methods on it
Post by: paramvir 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.