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

how to detect same selection?

3 Answers 140 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Buzz
Top achievements
Rank 1
Buzz asked on 21 Mar 2011, 03:25 PM
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

3 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 22 Mar 2011, 11:32 AM
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
0
Buzz
Top achievements
Rank 1
answered on 22 Mar 2011, 01:19 PM
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.
0
Valeri Hristov
Telerik team
answered on 22 Mar 2011, 04:56 PM
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
Tags
ComboBox
Asked by
Buzz
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Buzz
Top achievements
Rank 1
Share this question
or