How do I databind the SelectedItems property? I'm just getting the following compilation error and can't find any examples of how it's done in the documentation
The property "SelectedItems" does not have an accessible setter.
3 Answers, 1 is accepted
0
Petar Kirov
Telerik team
answered on 18 Jul 2013, 08:36 AM
Hi Ben,
The RadTimeline.SelectedItems property works like the SelectedItems properties of other WPF controls, like ListBox, that is - it supports only operations defined by the IList interface like adding, removing and clearing. If you want to programmatically change the selected items, you can keep a reference this collection in your ViewModel and update it from there.
Regards,
Petar Kirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely. Sign up for Free application insights >>
How can I keep a reference to it in my ViewModel if I can't bind to it in the XAML? Please could you provide an example?
Thanks
0
Petar Kirov
Telerik team
answered on 22 Jul 2013, 02:50 PM
Hi Ben,
Actually you can create a Behavior in order to synchronize the RadTimeline.SelectedItems property with a similar property in your ViewModel. Here you can see how the same is achieved with a ListBox. You should be able to port that code to your project with minimal changes.
Regards,
Petar Kirov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely. Sign up for Free application insights >>