Experiencing an infinite loop on moveRowTo() in version v2.1. I have a Treegrid where ‘A’ is the ultimate parent with a child of ‘B’. ‘B’ has a child of ‘C’.
A
-----B
----------C
I have a requirement where the user can click a button to make ‘C’ become the top of the tree. The result should look as:
C
-----A
----------B
I use moveRowTo() but the library goes into an infinite loop because I think it’s adding A to C before the delete happens. My code is as follows:
var selectedId = tree.getSelectedId();
tree.moveRowTo(tree.getRowId(0),selectedId,“move”,“child”,tree);
Is there a simple way to achieve a replacement of the top node in a treegrid without using a temporary treegrid?
Thank you.