ParamQuery grid support forum
General Category => Help for ParamQuery Grid (free version) => Topic started by: joelclark on December 10, 2020, 02:58:09 am
-
Hi There,
If I save a record in the child grid then it collapses it and you have to reopen it. Is there a way to stop this? After save we are calling "$(".vc-facility-detail").pqGrid("refreshDataAndView");"
Before save image is before save.jpg. Also I don't get how to attach pictures to the post with the whole "" thing.
(http://before save.JPG)
If we change the highlighted yellow column and save it then it looks like the aftersave.jpg image.
(http://aftersave.JPG)
-
There is no need to call refreshDataAndView to save data in grid. Even if you need it for some other purpose, you can call refreshDataAndView on the child grid, why call it on the parent grid?
-
So we are calling refreshDataAndView on the parent because if you look at the column "Sust Pac" The parent row has the total of "3,000.090" and then the two detail grid records are "1.000" and "2,999.090". If I update the detail grid record to be "2.000" instead of "1.000" I want the parent grid column of "3,000.090" to update to "3001.090" if that makes sense? Basically after the save we want to update the value of both grids and if we call the refresh just on the child then it doesn't update the parent records amount.
Thanks,
Joel
-
No need to use refreshDataAndView, updateRow method can be called on parent grid from child grid to update values in the parent grid.
Another easy solution: since you have same columns in parent and child, treegrid could be used and Excel formulas could be used in parent rows to auto update the values when values in child rows change.
-
I am calling refreshDataAndView() on nested grid inorder to show updated value, but still struggling to show updated value on parent grid. I tried updateRow() but didn't work can you suggest something?
-
What difficulty are you facing with updateRow? It's supposed to work.
As mentioned earlier, treegrid is an alternative solution and is better fit for your use case.