FindNodebyText() case insensitive method in javascript
Cancel
The title field is required!
Thread is closed for posting
1
posts,
1
answers
-
Answer
5ECBDA0A-E181-4825-9CE2-A4BD57411770
24
posts
Member since:
Sep 2008
Posted 29 Oct 2008
Link to this post
RadControls version |
RadTreeView for ASP.NET AJAX
|
.NET version |
3.5
|
Visual Studio version |
2008
|
programming language |
JavaScript
|
browser support |
all browsers supported by RadTreeView for ASP.NET AJAX
|
- PROJECT DESCRIPTION
The built in client side method, FindNodeByText() performs case sensitive search. Although in the next Q3 release of the Telerik controls the server side method has the functionality to perform insensitive search, but I don't see an equivalent client side method which does that. I wrote a javascript method, which is called on onClick event of html button and highlights all matching node(s)/childnode(s) with the whatever text sent via html textbox. The multiple select property should be set to true, if you want user to enter any part of the text to search (as this uses Regular Expression to search). The treeview should be populated before performing this search. If a treeview is not a databound control then it is very easy, or else (for databound treeview controls) you will have to use the hierachical/recursive query (With Clause in SQL Server) to populate the treeview.
-