This is a migrated thread and some comments may be shown as answers.
Bind SelectedItem and to checked item
1 Answer 25 Views
This is a migrated thread and some comments may be shown as answers.
Øystein
Top achievements
Rank 1
Øystein asked on 04 Feb 2011, 02:12 PM
Hi.

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?

Regards

Øystein

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 08 Feb 2011, 06:06 PM
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.

Greetings,
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>>
Asked by
Øystein
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or