We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Need search option in tree view control

Thread ID:

Created:

Updated:

Platform:

Replies:

143627 Mar 29,2019 10:37 AM UTC Apr 3,2019 12:55 PM UTC Angular - EJ 2 3
loading
Tags: Treeview
Ebenezer
Asked On March 29, 2019 10:37 AM UTC

Hi, 
     I have been using tree view control with checkbox and i need an option to search node in tree view using a text box. Is it possible? kindly share a code or example.




Regards, 
Justin Ebenezer

Christopher Issac Sunder K [Syncfusion]
Replied On April 1, 2019 10:25 AM UTC

Hi Justin Ebenezer, 

Greetings from Syncfusion!!! 

We have prepared a custom sample to filter Treeview nodes. Please check the below link 

In this sample, we have used a textbox for filtering Treeview items and in the change event of Textbox, we have filtered the items using Datamanager to update the Treeview datasource. 

Please check and get back to us if you have any further concerns. 

Thanks,
Christo 


Ebenezer
Replied On April 2, 2019 11:59 AM UTC

Hi, 
     I just saw your example back then, having some issues while using that. 

1. If i check a node using search input option then corresponding node was still unchecked once i clear the input.
2. "let query = new Query().where(new Predicate.or(predicats));" compile error, that it should be void.
3. If i check some nodes without using search option and then if i try to search 'em it shows as unchecked.


Regards, 
Justin Ebenezer

Christopher Issac Sunder K [Syncfusion]
Replied On April 3, 2019 12:55 PM UTC

Hi Justin Ebenezer, 

Thanks for the update. 

We have resolved the search and checking tree nodes while performing search operation related issues. In the provided sample, we have maintained the checked nodes in a private array and update it while changing the dataSource in the dataBound event. Also we disabled the autoCheck to achieve independent behavior of checked state.  


Please check the updated sample and let us know if you have any concerns. 

Thanks, 
Christo 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;