Need to open Drop down event after lost focus

5 posts, 1 answers
  1. Surya
    Surya avatar
    35 posts
    Member since:
    Nov 2011

    Posted 15 Nov 2012 Link to this post

    Hi,

      I want to know how to open drop down for Rad Multi - Column combo box even after  lost focus from multi-column combo box  i..e multi-column combo box leave event.

    Thanks & Regards,
    Surya.
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 20 Nov 2012 Link to this post

    Hello Surya,

    Thank you for writing.

    If I understand correctly, you want to problematically open the drop down of RadMultiColumnComboBox when the control is not on focus. If so, here is how you can do that:
    radMultiColumnComboBox1.MultiColumnComboBoxElement.ShowPopup();

    I hope this helps.

    Regards,
    Stefan
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Surya
    Surya avatar
    35 posts
    Member since:
    Nov 2011

    Posted 20 Nov 2012 Link to this post

    Hi Stefan

    Thanks for Response.

    I tried with ShowPopup() method and i fails to full fill my requirement.

    Following is my requirement in detailed :

    I have multi column combo box , on leave event, i am binding data , if there is no exact match with Entered value ,instead of going to next control , i want to open drop down and stay focussed  on same control .


    Thanks & Regards,
    Surya.
  5. Answer
    Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 23 Nov 2012 Link to this post

    Hi Surya,

    The only way to keep a control from loosing its focus is to cancel its Validating event. To handle your scenario, please move your logic to the validating event, cancel it when needed and show the popup:
    void radMultiColumnComboBox1_Validating(object sender, CancelEventArgs e)
    {
        if (yourCheckHere)
        {
             
        e.Cancel = true;
        radMultiColumnComboBox1.MultiColumnComboBoxElement.ShowPopup();
        }
    }

    Please note that it is important that you disable the control's animations in order to be able to show the popup correctly, since they cause a delay in closing the popup which might lead to undesired behavior:
    radMultiColumnComboBox1.MultiColumnComboBoxElement.DropDownAnimationEnabled = false;

    I hope this helps.
     
    Kind regards,
    Stefan
    the Telerik team
    Q3’12 of RadControls for WinForms is available for download (see what's new). Get it today.
  6. Surya
    Surya avatar
    35 posts
    Member since:
    Nov 2011

    Posted 23 Nov 2012 Link to this post

    Hi Stefan ,

    Thanks for supporting  , its works here.


    Thanks & Regards,
    Surya.


Back to Top
UI for WinForms is Visual Studio 2017 Ready