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

3 posts, 0 answers
  1. Iliya
    Iliya avatar
    4 posts
    Member since:
    Sep 2012

    Posted 10 Sep 2012 Link to this post

    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. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 13 Sep 2012 Link to this post

    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 >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Iliya
    Iliya avatar
    4 posts
    Member since:
    Sep 2012

    Posted 23 Sep 2012 Link to this post

    Thank you Julian, i will check this solution 

    iliya :)
Back to Top