How to unselect an item?

5 posts, 0 answers
  1. Paul
    Paul avatar
    25 posts
    Member since:
    May 2013

    Posted 31 May 2013 Link to this post

    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
  2. Petar Kirov
    Admin
    Petar Kirov avatar
    425 posts

    Posted 05 Jun 2013 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Paul
    Paul avatar
    25 posts
    Member since:
    May 2013

    Posted 05 Jun 2013 Link to this post

    I tried the selectitem = null option, but it didn't deselect the item???

    Paul
  5. Paul
    Paul avatar
    25 posts
    Member since:
    May 2013

    Posted 05 Jun 2013 Link to this post

    neither of those options seem to deselect the item???

    Paul
  6. Paul
    Paul avatar
    25 posts
    Member since:
    May 2013

    Posted 05 Jun 2013 Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready