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

Winform RadTreeview Find Id?

4 Answers 199 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Murat
Top achievements
Rank 1
Murat asked on 15 Oct 2008, 11:22 AM
Hi,

I using radtreeview but I dont find Id relation in database.How is get that
any idea ?

4 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 15 Oct 2008, 11:37 AM
Hello m,

I noticed that you have downloaded RadControls for ASP.NET AJAX. This is a forum for WinForms controls.

Can you please explain in more detail the problem and the exact product / version you are using?

Thanks

Regards,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Murat
Top achievements
Rank 1
answered on 15 Oct 2008, 09:14 PM
hi

I usign RadControls for WinForms Q1 2008 and I could Root item ID fallow code ;

radTreeView1.SelectedNode.Key

but I dont find most small parent ID. If I try that return up level node at most small parent example
ID    Name    ParentID
1      m           
2      k               1
3      c                2

If I select c return k ParentID. How is select c(most parent) parentID
thank you

Best Regard
Murat KARAKUS
Database Administrator
  
0
Nick
Telerik team
answered on 16 Oct 2008, 12:04 PM
Hi Murat,

Please update to our latest release - there are a lot of improvements and fixes. One of the changes is that the  Key property has been deprecated and should not be used. It is unrelated to your database key too. It was used as a unique id for a node just in our framework and with no persistence in mind.

For your case, please use the Tag property to get the value member of the selected node:

this.radTreeView1.SelectedNode.Tag 

You should also set the ValueMember to your key column.

Do not hesitate to write back if you have further questions.

Greetings,
Nick
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Murat
Top achievements
Rank 1
answered on 16 Oct 2008, 01:54 PM
Hi Mr. Nick,

thanks for your help,
I using sqldatareader.I take radtreeview1.SelectedNode.Text I make reading value datareader and than I give unique Id in database.
but your answer best of :) I tested code.it running thats it.
again
thanks.

best regards
Murat KARAKUS
Database Administrator
Tags
Treeview
Asked by
Murat
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Murat
Top achievements
Rank 1
Nick
Telerik team
Share this question
or