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

Filter RadTreeView Nodes Client side

1 Answer 179 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 10 May 2011, 09:55 AM
Hi,
I have a radtreeview control on my aspx page. The treeview control is populated from a dataset on selectedindex_change event of a combobox control through asynchrounous postback.

I have a text box in which the user enters a string, based on the string entered the nodes which contain the string in their text must only be displayed. eg:- if(treeview.node[i].text.contains(textbox.text))
                            {
                                display node........
                            }
                            else
                            {
                                node.visible=false;
                            }
To achieve this I have a textbox onkeypress event. But whenever i try "treeview.AllNodes.length" in my javascript it gives me null.
Kindly guide me through.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Kate
Telerik team
answered on 12 May 2011, 02:05 PM
Hello Mark,

Please try using the get_count() function, for example tree.get_nodes().get_count(). For more details you can refer to this help article.

Best wishes,
Kate
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
TreeView
Asked by
Mark
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or