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

Hide /Show Tree View Nodes

1 Answer 145 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Nen
Top achievements
Rank 1
Nen asked on 13 Oct 2010, 08:57 AM
HI All,

I am new to using Telerik controls and i have the following requirment.

on a page load i build a tree using the telerik tree view control.

I want to achieve the following functionality 

1)  to the same page i mentioned above i will pass a node id (As a part of the query string).
2) based on the  node id passed the tree should show only the children and hide all the parents associated with it.

Is this possible using the telerik view control ?

Thanks
-Nen

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Oct 2010, 12:26 PM
Hi Nen,


To find a Node by Text, Value or Attribute, use the methods FindNodeByText(), FindNodeByValue() and FindNodeByAttribute().
The documentation describes more on this.
 Finding Nodes at Runtime

Now iterate through the nodes and set the Visible property of node accordingly. I hope the following links will be of help in iterating through the nodes from ocde.
Tutorial: Finding Nodes
Traversing Nodes



-Shinu.
Tags
TreeView
Asked by
Nen
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or