Treeview and grid integration

2 posts, 1 answers
  1. Elzo
    Elzo avatar
    1 posts
    Member since:
    Jan 2018

    Posted 15 Jan 2018 Link to this post

    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?


  2. Answer
    Ivan Danchev
    Ivan Danchev avatar
    2150 posts

    Posted 17 Jan 2018 Link to this post

    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. 

    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.
Back to Top