Hi,
I have an angular TreeView, and I need to reorder nodes from a specfic parent by a item property (index).
How can I do this?
1 Answer, 1 is accepted
0
Petur Subev
Telerik team
answered on 16 Dec 2014, 09:15 AM
Hello Julian,
If you want to reorder the items of the treeview you need to change the item order in that specific level of the dataSource hierarchy - the TreeView will automatically react to the change and redraw itself.
The methods which you can use of the Hierarchical dataSource are the same that the regular DataSource has. Check the examples in the documentation:
Removing an item from the dataSource and inserting it at specific position should handle this reordering that you look for. To get the current items of the dataSource use the data method.