jQuery UI Widgets › Forums › TreeGrid › updateBoundData not working
Tagged: clear, Tree, treegrid, updatebounddata, virtualModeCreateRecords
This topic contains 3 replies, has 2 voices, and was last updated by hurricane 7 years, 7 months ago.
-
Author
-
Hi ,
I am trying to use tree grid with virtualModeCreateRecords where I am having child records populated on the basis of parent records expansion. Now, I need to do refresh on the grid records which will eventually refresh all of my parents. Hence, I have used updateBoundData to refresh parents in the grid. It did not work like this. Then, I tried using clear function on the grid before calling updateBoundData. While using clear, It is reloading parents successfully .
Different scenarios tried and outcome of those mentioned as follows :
Calling updateBoundData method only :
$("#treegrid").jqxTreeGrid('updateBoundData'); //Nothing happening with this call
Calling clear method only :
$("#treegrid").jqxTreeGrid('clear'); //This call is reloading grid by invoking virtualModeCreateRecords method again. But if we do other operations on grid like sort or filter , it is giving exception of data binding.
Calling clear and updateBoundData together :
$("#treegrid").jqxTreeGrid('clear'); //This call is reloading grid by invoking virtualModeCreateRecords method again $("#treegrid").jqxTreeGrid('updateBoundData');//Next call to updateBoundData will again reload grid, It will bind data properly .
Please let me know if I am missing any configuration steps for my grid.
Regards.
Hi hurricane,
updateBoundData is supposed to do nothing in Virtual mode as you do not have 1 data source there. You have multiple dataAdapter instances, created dynamically which load data dynamically on demand when you expand records.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
Thanks for your quick response.
Do you mean that updateBoundData is not even needed for this type of implementation? If so then, As mentioned in the second scenario where I have only used clear method to reset the grid which is loading data back using the existing data source (ie. ajax associated for expandedrecords in virtual mode).But once data is loaded like that, I was performing sorting on some of the columns which was resulting into an exception of data binding.
Please suggest if there is a way to reset the grid in virtual mode for parent records.
Regards.
++Adding exception details :
TypeError: that.source.hierarchy is undefined
-
AuthorPosts
You must be logged in to reply to this topic.