jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Nested Grid refresh data
This topic contains 7 replies, has 5 voices, and was last updated by ziggy 9 years ago.
-
AuthorNested Grid refresh data Posts
-
Good day,
Currently I am working with nested grid using the code in your DEMO “Nested Grid”. Works perfectly fine, it INSERT the data to my Database. My question is how can I refresh nested grid? I tried ==> $(“#jqxgrid”).jqxGrid(‘updatebounddata’); but this is not the grid that I want to refresh, the grid that I want to refresh after saving to DB = = >> $(“#grid”).jqxGrid(‘updatebounddata’) but its not working!Thanks in advance for your help.
Hi Mcgyver,
When you create the Nested Grids in the “initrowdetails” callback, you may store the nested Grid’s HTML Element in a custom Array. Then when you want to refresh these nested Grids, loop through your array and call their “updatebounddata” method.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comhello Peter!
A BIG Thanks for a fast reply.
Just to give you an additional info on what I’m doing, I integrate the popup editing to a Nested grid again base on the demo!
so when I click the edit button on the popup editing (I change the edit button to save button) it will save to my database no problem with saving it saves the data. Can you please give me an example on how to do it base on the example demo!Thanks again!
Hi peter, would you mind showing an example of what you mentioned above. i too have run into this hickup and cant seem to find a way around it.
a code of a working sample would help a lot of us. Thanks
Hi Karen,
Unfortunately, we do not have example for exactly that scenario. Within the “initrowdetails” function store the passed HTML Elements within an array. When you want to refresh a nested Grid data, use that array i.e something like $(array[0]).jqxGrid(‘updatebounddata’) or $(array[0]).jqxGrid({source: newAdapter});
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comJack, you got it?
Hi Peter,
I assigned a specific id for the nested grid
var grid = $($(parentElement).children()[0]); $(grid).attr('id', 'details_' + id);
However, I get the error
jqxcore.js:7 Uncaught Error: Invalid Selector - #details_2! Please, check whether the used ID or CSS Class name is correct.
when I tried to $(“#details_2”).jqxGrid(“updatebounddata”);
Help.
Thanks!
-
AuthorPosts
You must be logged in to reply to this topic.