ComboBox SelectionChangeCommited equivalent event for radDropDownList ?

4 posts, 0 answers
  1. Pantelis
    Pantelis avatar
    7 posts
    Member since:
    Jan 2012

    Posted 27 Feb 2013 Link to this post

    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.
  2. Anton
    Admin
    Anton avatar
    167 posts

    Posted 01 Mar 2013 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Pantelis
    Pantelis avatar
    7 posts
    Member since:
    Jan 2012

    Posted 02 Mar 2013 Link to this post

    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.
  5. Anton
    Admin
    Anton avatar
    167 posts

    Posted 05 Mar 2013 Link to this post

    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.
Back to Top