Hide /Show Tree View Nodes

2 posts, 0 answers
  1. Nen
    Nen avatar
    7 posts
    Member since:
    Oct 2010

    Posted 13 Oct 2010 Link to this post

    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 ?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Oct 2010 Link to this post

    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

Back to Top