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

Setting SelectedItem with behind code not applying the Selected template

2 Answers 42 Views
TimeLine
This is a migrated thread and some comments may be shown as answers.
MARTIN
Top achievements
Rank 1
MARTIN asked on 25 Nov 2014, 03:32 AM
A two way binding to selected item is not applying the "Selected" (in this case "Pressed") template to the timeline item.

Surely expected behaviour would be the same as that of a Gridview or Listview, that is, setting the SelectedItem/s in the view model should result in the same appearance as if the user had actually clicked the timeline item with the SelectionMode set to single?

2 Answers, 1 is accepted

Sort by
0
MARTIN
Top achievements
Rank 1
answered on 25 Nov 2014, 03:34 AM
Specifically, our use case is that we ALWAYS want an item selected visually on the timeline. If the user clicks a blank space on the timeline, we want to force selection to the first item in the ItemsSource. This does not appear to work from behind code either (manually setting the RadTimeline's SelectedItem property also does not apply the template)
0
Tsvetie
Telerik team
answered on 27 Nov 2014, 01:27 PM
Hi Martin,

I am not quite sure I understand the problem. In order to set SelectedItem or add items to the SelectedItems collection, you should first set IsSelectionEnabled to "true". In case this does not help you, could you please explain in detail the case and send us code snippets, demonstrating your case?

Regards,
Tsvetie
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TimeLine
Asked by
MARTIN
Top achievements
Rank 1
Answers by
MARTIN
Top achievements
Rank 1
Tsvetie
Telerik team
Share this question
or