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

How to unselect an item?

4 Answers 205 Views
TimeLine
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 31 May 2013, 07:18 PM
Is there a way to programmatically unselect an item. Right now, upon selection, we launch a window to do some processing on the item and when we are done, we want to return the rad time line to its prior state. We want to unselect the item, so if the item is selected again, it will launch the edit window.

Please let me know.
Paul

4 Answers, 1 is accepted

Sort by
0
Petar Kirov
Telerik team
answered on 05 Jun 2013, 03:40 PM
Hi Paul,

If the SelectionMode of the Timeline is Single, you can use the SelectedItem property to change the currently selected item. Setting the property to null will deselect  it.
If the SelectionMode is Multiple or Extended, you can use the SelectedItems collection to add/remove items. 
Another way to deselect all items is to change the IsSelectionEnabled to false.

I hope this helps.
 
Regards,
Petar Kirov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Pavel
Top achievements
Rank 1
answered on 05 Jun 2013, 05:25 PM
I tried the selectitem = null option, but it didn't deselect the item???

Paul
0
Pavel
Top achievements
Rank 1
answered on 05 Jun 2013, 05:27 PM
neither of those options seem to deselect the item???

Paul
0
Pavel
Top achievements
Rank 1
answered on 05 Jun 2013, 09:04 PM
nevermind, it works. I kept pressing cancel on my dialog box instead of SAVE and my call to null the selectitem was not called for the cancel case. 

All good...

thanks
Paul
Tags
TimeLine
Asked by
Pavel
Top achievements
Rank 1
Answers by
Petar Kirov
Telerik team
Pavel
Top achievements
Rank 1
Share this question
or