This is a migrated thread and some comments may be shown as answers.

Treeview search

1 Answer 81 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 08 Apr 2014, 04:19 PM
Hello,

 I'm having trouble finding a solution that allows me to retrieve a node within a treeview that ignores the case type.

 The code below works if the correct case is supplied.

  var ds = treeview.dataSource;
  var node = ds.get(path[0]);

Is there a simple way to ignore the case on the data source?

Regards

Paul

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 10 Apr 2014, 10:23 AM
Hi Paul,

Case insensitive search is currently not supported out of the box. This functionality however, could be implemented using a custom solution. One approach is to use a case insensitive jQuery selector to find the li item matching the search criteria and use it as a parameter for the DataSource's getByUid method. Another approach would be to iterate over the DataSource's items and use a regex that ignores the case on the desired field, then pass the item's uid to the TreeView's findByUid method to get the li element.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeView
Asked by
Paul
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or