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

Is it possible to data bind TreeView.SelectedNode property in winforms

2 Answers 109 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Iliya
Top achievements
Rank 1
Iliya asked on 10 Sep 2012, 04:27 PM
Hi all, i am working with RadTreeView control and want to get selectedNode when some was selected. I know that it is possible to get this node by using radTreeView.SelectedNode property, but i wanted to data bind this property and work directly with bound logic object. My question, is it possible to data bind selectedNode property in winforms and if yes, how can i do this ?

Thank in advance :)

Iliya

2 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 13 Sep 2012, 04:24 PM
Hi Iliya,

The SelectedNode property of RadTreeView control can have null value in some situations and property binding will not work properly in this case. To support full two-way binding for this scenario, you can implement INotifyPropertyChanged event in your Form and a new property to process the SelectedNode behavior. 

Please review the sample implementation in the attached file.

I hope this helps.

All the best,
Julian Benkov
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Iliya
Top achievements
Rank 1
answered on 23 Sep 2012, 07:57 AM
Thank you Julian, i will check this solution 

iliya :)
Tags
Treeview
Asked by
Iliya
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Iliya
Top achievements
Rank 1
Share this question
or