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

Need to open Drop down event after lost focus

4 Answers 420 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
Surya
Top achievements
Rank 1
Surya asked on 15 Nov 2012, 07:29 PM
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.

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 20 Nov 2012, 11:03 AM
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.
0
Surya
Top achievements
Rank 1
answered on 20 Nov 2012, 03:29 PM
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.
0
Accepted
Stefan
Telerik team
answered on 23 Nov 2012, 01:03 PM
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.
0
Surya
Top achievements
Rank 1
answered on 23 Nov 2012, 04:09 PM
Hi Stefan ,

Thanks for supporting  , its works here.


Thanks & Regards,
Surya.


Tags
MultiColumn ComboBox
Asked by
Surya
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Surya
Top achievements
Rank 1
Share this question
or