This is a migrated thread and some comments may be shown as answers.
Treeview and grid integration
1 Answer 24 Views
This is a migrated thread and some comments may be shown as answers.
Elzo
Top achievements
Rank 1
Elzo asked on 15 Jan 2018, 12:50 PM

Hi there,

I was wondering if it was possible to sort the grid view data with the treeview. 

I would want to load my data of say.... cars and display it in the treeview, but also sort everything in the treeview ex, by owner, by brand, etc. 

If this is possible, how would i go about handling the data loading. Do I need to make a new structure for the data or can I simply use a different datasource?

Thanks. 

1 Answer, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 17 Jan 2018, 08:23 AM
Hi Elzo,

We have a HowTo article, which demonstrates how the TreeView can be sorted. It shows both initial sorting, that is the dataSource the TreeView is bound to is sorted through the dataSource sort option, and sorting using the sort() API method in the setSort function, which is called when the "Change sort order" button is clicked.
As for setting a different dataSource to the TreeView, for example you have initialized it with one dataSource, but want to load different data into the widget you can do so with the help of the TreeView's setDataSource method. 

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Elzo
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or