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

Set Treeview Child Node Selected

0 Answers 81 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Kaushal
Top achievements
Rank 1
Kaushal asked on 03 Dec 2010, 07:39 AM
Hi ALL,

        I have one treeview on left panel which will bind from database, treeview have N no. of parents and each parent have N no. of childs and each child have N number sub child.

On right side i have one textbox, when user enter some value and if it is one of treenode (Parent/Child/SubChild) then it should be selected..and on that particular selected node i need to fire treeview_nodechange event to bind right side grid.When user try to search text from textbox than treeview may be collapse or expanded, but once page load tree always be collapse.


Parent1
 
    Child11

    Child12
 
           Sub Child21

           Sub Child22
 
           Sub Child23

Parent2

     Child21

           Sub Child21

           Sub Child22

     Child22


Here on page load grid will be collapsed, when user try to search text like "Child11" then Parent1 should be expand and Child11 should be selected.

Same suppose user try to search "Sub Child22" than Parent2 and Child21 should be expand and "Sub Child21" should be selected

And in both case treeview_nodechange event should be fire.

I try this using

                   RadTreeView1.FindNodeByText(SearchText).Selected := true;

Its running properly for parent node only, while i am trying with any child or sub child node it will give me error and got the node as null.

Please help me on same.

Thanks
            

No answers yet. Maybe you can help?

Tags
TreeView
Asked by
Kaushal
Top achievements
Rank 1
Share this question
or