jQuery UI Widgets › Forums › TreeGrid › Update JQXTreeGrid without having all rows collapse
Tagged: jqxtreegrid update no-collapse
This topic contains 7 replies, has 2 voices, and was last updated by admin 1 year, 3 months ago.
-
Author
-
I have a JQX Tree Grid that I am updating from a stream.
The update works, but the tree grid is completely collapsed after the update. I would like the grid to stay expanded as it was.
I am calling .jqxTreeGrid(‘updateBoundData’) at the end of the update.
I have tried combinations of beginUpdate/endUpdate and refresh; these did not update the grid.
function updatetreegrid(msg) { // UpdateId in message should be the column to use let { GridName, UpdateId, Rows } = msg; for (let i = 0; i < Rows.length; i++) { let row = Rows[i]; let doDelete = row.IsEmpty === 'DELETE'; let found = eval("data"+GridName+".findIndex(d => d['"+UpdateId+"'] == row[UpdateId])"); if (doDelete) { if (found >= 0) { eval("data"+GridName+".splice(found, 1);"); } } else { if (found == -1) { eval("data"+GridName+".push(row)"); } else { eval("data"+GridName+"[found] = row"); } } } //$("#grid"+GridName).jqxTreeGrid('beginUpdate'); //$("#grid"+GridName).jqxTreeGrid('endUpdate'); //$("#grid"+GridName).jqxTreeGrid('refresh'); $("#grid"+GridName).jqxTreeGrid('updateBoundData'); }
Is there a different update command that won’t collapse all of the rows? Is it possible to ask which rows are expanded and re-apply it after the update (not great, but better than nothing).
Thanks!
Hi,
We are aware of this limitation of the TreeGrid. This currently makes a re-render and the state is lost. We created a work item to update this for the next version of the TreeGrid.
Best regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/Thanks for the update!
Any ETA for when that could be released?
Hi,
By the end of the month, it should be ready.
Best regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/Fabulous!
Please do reply here when it’s ready.
Thanks!
Happy new year!
Any updates on ETA?
Thanks!
CharlesHi Charles,
The issue is resolved in an internal build. When we have a public release, it will come into it. If you’re already a customer, you can request access to the internal build by sending an email to support@jqwidgets.com
Best regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.