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

API support of RadTreeView

3 Answers 108 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Satish J
Top achievements
Rank 1
Satish J asked on 09 Sep 2009, 11:03 AM
Hi,

     Could you please confirm the availability of the following features in the API of RadTreeView.

1) Get the child node given the index of a parent (first level).
2) Find the Node by name.
3) Find the Node by Key (an alternate identifier for a node).
4) Find the node by Index.
5) Update a node fiven the node key and its parent Key.
6) Delete a node given its key.
7) Select a node, given its key.
8) unselect a node given its key.
9)Check all the Parent nodes.
10) check a particular node.
11) Check all the child nodes of a parent node.

Thanks,
Satish J

3 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 09 Sep 2009, 11:23 AM
Hi Satish J,

Find the answers below:

1) Get the child node given the index of a parent (first level).
 - Yes, use the Items collection with indexer - e.g. Items[0].

2) Find the Node by name.
 - Yes, use the GetItemByPath(string path) method.

3) Find the Node by Key (an alternate identifier for a node).
 - Yes - use the TextSearch.Path property to specify the property which will be used as a key. See attached project.

4) Find the node by Index.
 - same as N1?

5) Update a node fiven the node key and its parent Key.
6) Delete a node given its key.
 - find the node and use the Remove method.

7) Select a node, given its key.
 - find the node and use the IsSelected property

8) unselect a node given its key.
 - find the node and use the IsSelected property

9)Check all the Parent nodes.
 - find the node and use the CheckState property it will propagate to its parents.

10) check a particular node.
 - find the node and use the CheckState property.

11) Check all the child nodes of a parent node.
 - find the node and use the CheckState property it will propagate to its children.

I also attached a sample project which explains how to search for a node.

All the best,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Satish J
Top achievements
Rank 1
answered on 09 Sep 2009, 12:13 PM
Hi Valentin,

                   Thanks for your response. The sample project complains of a null reference while executing the method 

GetItemByPath.

The following question was missed in the previous response. Would appreciate a response for this too.

1) Update a node given the node key and its parent Key.

 

Thanks,

Satish J

 

 

0
Valentin.Stoychev
Telerik team
answered on 09 Sep 2009, 01:11 PM
Hello Satish J,

1) Update a node given the node key and its parent Key.
What do you mean by "update the node". Basically when you have the search API - you get a reference to the node and you can change its properties on the fly.

As for the project - please find attached the project with latest dlls.

Best wishes,
Valentin.Stoychev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
TreeView
Asked by
Satish J
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Satish J
Top achievements
Rank 1
Share this question
or