Categories | Question details Back To List | ||
TreeGrid behavior I have discovered the following strange behavior of the dhtmlxTreeGrid: The treegrid shows the same behavior in any comparable case, but as a simple example assume there are 2 elements in the TreeGrid, both on level 0: id1 id3 So the root node of these two element has the id "0". The call "treegrid.getSubItems(0);" will give you the list "id1,id3" as expected. Then insert another element id2 between id1 and id3: id1 id2 <-- new id3 Now "treegrid.getSubItems(0);" gives you the list "id1,id3,id2". This is not what I expect that function to do as the list should be "id1,id2,id3". The order of the elements is screwed up because the new id seems simply to be added to end of the list instead of inserted at the correct position. Is this the intended behavior of the TreeGrid / getSubItems() or is it a bug? How can this be fixed? Answer posted on Nov 09, 2007 01:26 The problem must not occur if you are using addRowAfter or addRowBefore command Problem confirmed and fixed for situation when addRow with index used , fix will be released as part of next build. If you need fix ASAP - please contact directly at support@dhtmlx.com , and provide your ref. number - we will send you updated code. ( please beware that usage of addRow can be tricky, the addRowAfter and addRowBefore is more simple|stable for treeGrid ) |