Skip to Content
0
Former Member
Jan 17, 2010 at 01:59 PM

Search fucntionality of Tree Node element in TreeHierarchy-need Sample code

105 Views

Hi All

Currentlly we have the requirement for search fucntionality of a Tree Node element in a Tree Hierarchy

Rathen using "equalsIgnoreCase()" we are using contains() method for searching with the given the word with respect to the entire hierarchy in the tree"

for example : if the entered text for search is "General" then on action of search button then the entered text will compare with all the node elements in the tree hiearchy with contains() method, suppose the entered text "general" contains three tree node elements then it is hightlighting only the last element in the Tree strucuture,

actually our requirement , after entering the "general" and click of action then it has to highlihht the first tree element which matched the key word "General" then next time again when we click on the search button it has to highlight the second tree element in the hiearchy and next time search button it has to highlight the tree element which matches the keyword "General" with contains comparision like that it will complete the search opeartion with given entered ketword till the end of the tree hierarchy and highlight the tree element on click of search button each time

.

Could you please provide the sample code on the same?? currently you had given the sample code with "equalsIgnoreCase" comparision but we are using comparision with " IsText.contains(TreeNodelement)" , when we are using the contains() method for comparision if it returns 3 Node elements but first time on click of the search button it has to highlight first tree element and next time on click of search button it has to highlight the second tree element in the Tree hiearchy until the end of tree hiearchy.

Could you please provide sample code on the same requirement??

Thanks in advance

Regards

Kalki Reddy