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

ComboBox SelectionChangeCommited equivalent event for radDropDownList ?

3 Answers 196 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Pantelis
Top achievements
Rank 1
Pantelis asked on 27 Feb 2013, 10:33 AM
Hello,

Whats the equivalent of RadDropDownList for classic WinForms ComboBox SelectionChangeCommited event? Kind of hard to guess since Telerik events lack documentation on Visual Studio Properties Window. 

Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Anton
Telerik team
answered on 01 Mar 2013, 03:43 PM
Hi Pantelis,

Thank you for writing.

There is no direct equivalent of SelectionChangeCommited event in our RadDropDownList control. Could you describe in detail what is your goal, so I can provide you with suitable solution for your case.

I am looking forward to your reply.

Greetings,
Anton
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Join us for a FREE webinar to see all the new stuff in action.

Interested, but can’t attend? Register anyway and we’ll send you the recording.
0
Pantelis
Top achievements
Rank 1
answered on 02 Mar 2013, 06:40 AM
I'm in a situation, where I need to bind controls frequently. Those are search criteria controls where the results are displayed in a datagrid. I would normally use SelectionChangeCommited in classic WinForms and set the SelectedValue property to the desired value, without raising the event whenever I rebind the controls (the search is done from a search Button).  I just found it a bit irritating hooking and unhooking the SelectedIndexChanged event everytime I need to rebind the controls (which is my workaround), so I was wondering if there was something similar to the event in question.

Thanks.
0
Anton
Telerik team
answered on 05 Mar 2013, 02:46 PM
Hi Pantelis,

Thank you for writing back.

Your workaround is good solution. However you can achieve the same behavior if you subscribe to SelectedIndexChanging event and cancel it depending on your logic:
void list_SelectedIndexChanging(object sender, Telerik.WinControls.UI.Data.PositionChangingCancelEventArgs e)
{
    if (Your condition)
    {
        e.Cancel = true;
    }
}
This will cancel SelectedIndexChanged and SelectedValueChanged events as well.

I hope this helps. If you have further questions, feel free to write back.

Kind regards,
Anton
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Join us for a FREE webinar to see all the new stuff in action.

Interested, but can’t attend? Register anyway and we’ll send you the recording.
Tags
DropDownList
Asked by
Pantelis
Top achievements
Rank 1
Answers by
Anton
Telerik team
Pantelis
Top achievements
Rank 1
Share this question
or