General Category > Help for ParamQuery Grid (free version)

Update the value of parent grid rows based upon nested records

(1/2) > >>

tarunsharma:
I have parent grid rows are showing sum of their nested records. Nested grid has filter option. I want to ask If I filter nested grid records, is it possible to update parent grids rows accordingly. Can you suggest something?

paramvir:
filter event is fired when records are filtered.

So you can listen to filter event of nested grids and call updateRow on the corresponding parent row.

tarunsharma:
I tried to update parent row within nested grid filter option but didn't work. For your reference I am share the code.

filter: function (event, ui) {
       var grid = $(".vc-facility-detail").pqGrid('getInstance').grid; //instance of master grid
       grid.updateRow({ rowIndx: 0 });
}

Can you suggest something.

tarunsharma:

--- Quote from: tarunsharma on January 12, 2021, 12:50:32 am ---I tried to update parent row using nested grid filter option but didn't work. I want to change the value of main grid row based upon filtered nested rows. For your reference I am sharing my code.

filter: function (event, ui) {
       var grid = $(".vc-facility-detail").pqGrid('getInstance').grid; //instance of master grid
       grid.updateRow({ rowIndx: 0 });
}

Can you suggest something.

--- End quote ---

tarunsharma:
I am able to update parent row based upon filtered nested grid using updateRow() method. Now I am facing the problem to update grand summary as par the updated rows of main grid. UpdateRow() method is not working to update summary row. can you suggest something?

Navigation

[0] Message Index

[#] Next page

Go to full version