how to detect same selection?

4 posts, 0 answers
  1. Buzz
    Buzz avatar
    32 posts
    Member since:
    Oct 2010

    Posted 21 Mar 2011 Link to this post

    Depending on how I have set up my combobox, I can detect when a user selects an item.  Either the property I have bound to SelectedItem changes, or the SelectionChanged event fires.
    But neither of these occur if the user selects the same item again.

    Any ideas of how I can detect this?
    Buzz
  2. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 22 Mar 2011 Link to this post

    Hello Buzz,

    Since the selection didn't changed (the user clicked on the selected item) RadComboBox does not fire its SelectionChanged event, nor the SelectedItem property is updated.

    Why do you need to know whether the user selected the same item? Probably we could provide some kind of guidance if we know what's the business need behind your request...

    All the best,
    Valeri Hristov
    the Telerik team
  3. UI for WPF is Visual Studio 2017 Ready
  4. Buzz
    Buzz avatar
    32 posts
    Member since:
    Oct 2010

    Posted 22 Mar 2011 Link to this post

    I was trying to use the re-selection to reset the state of my UI and the data that gets displayed.  Obviously I could just add another button for this, but the combobox actually makes a lot of sense, since selecting any other item in the combobox will repopulate the UI based on the selection.
    I always wish there were more events to subscribe to in UI controls.  But microsoft's combobox is the same way.
  5. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 22 Mar 2011 Link to this post

    I understand your point now, but I cannot suggest a workaround. I guess the only way to resolve the problem is to put another button or two (OK and Cancel) on the form...

    All the best,
    Valeri Hristov
    the Telerik team
Back to Top