Bind SelectedItem and to checked item

2 posts, 0 answers
  1. Øystein
    Øystein avatar
    2 posts
    Member since:
    Dec 2010

    Posted 04 Feb 2011 Link to this post


    For an optionlist we uses a RadTreeView with optionlist enabled. We are also using MVVM(light toolkit) and here we have an observable collection of the options the user could have. There is a property for the selectedItem as the user only can select one option. For this binding is working as expected and sets the context hasChanges to true. The way it works now is that the user clicks on the Item and there is an event on the view(bad MVVM i know...) that sets the radiobutton to ON. But I have not found a way of setting the selecteditem when the user clicks inside the radiobutton. Do I need to write som more view codebehind or is this something that can easily be solved with MVVM and bindings?


  2. Petar Mladenov
    Petar Mladenov avatar
    3152 posts

    Posted 08 Feb 2011 Link to this post

    Hi Øystein,

    Please find the attached project where the basic approach when binding IsSelected, IsExpanded or IsChecked  is used. Basically it uses the approach described here - ContainerBindings.
    Feel free to ask if you need further assistance.

    Petar Mladenov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Back to Top