ParamQuery grid support forum
General Category => ParamQuery Pro Evaluation Support => Topic started by: ksikes on September 20, 2016, 02:09:50 am
-
Following the Nested Grid demo for ParamQuery Pro I setup three levels of grids in the hierarchy of Departments, Categories, and Courses. An on change event at the courses level refreshes data at the Departments level, but I find that I cannot refresh the view of the data in the nested grid, Categories programatically. I find that if I collapse the Categories grid and expand it again, the underlying data is refreshed and renders properly.
I am calling "refreshDataAndView" at the top level grid, i.e. $("#grid_Department").pqGrid("refreshDataAndView");
I expected the call to refresh would trickle down through the nested grid(s) but it does not seem to do so.
Wondering if there is a way to call the refresh directly to the nested grid but I am unable to determine the proper selector to use.
Is there a built in method to programatically force the refresh of a nested grid? If not, can we programatically collapse and expand a nested grid to force the refresh?
Thanks in advance for any insight you can provide.
-
Reference to detail grid is stored in corresponding parent row as.
var child = rowData.pq_detail.child.pqgrid( 'instance' );
child.refresh(); //refresh the nested grid.
There is a similar question here: http://paramquery.com/forum/index.php?topic=1540
-
For anyone who does what I did and copy and paste the reply code sample above, please be aware of the small typo pqgrid should read pqGrid (note upper case G).
var child = rowData.pq_detail.child.pqGrid( 'instance' );