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

RadCheckedDropDownList focusing popups?

7 Answers 137 Views
CheckedDropDownList
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 30 Mar 2016, 07:48 PM

Hello ,

I am trying to use a radCheckedDropDown list in a winforms application (C#).  The list is working the way I want it to except for 1 thing.

When I click the dropdown list it shows (which is correct) however while it is open if I start to type in the text area the text popup shows in front of the dropdown popup, and as a result you can click through to the drop down list.  What I would like is to close the dropdown portion when typing, and vice versa when using the drop down list. 

If I use a standard combobox I can accomplish this by  hooking the preview and the droppeddown events, however the radcheckeddropdownlist does not have the droppeddown event.

private void comboBox_DropDown(object sender, EventArgs e)

{

ComboBox cbo = (ComboBox)sender; cbo.PreviewKeyDown += new PreviewKeyDownEventHandler(comboBox_PreviewKeyDown);  

}

private void comboBox_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)

{

ComboBox cbo = (ComboBox)sender;

cbo.PreviewKeyDown -= comboBox_PreviewKeyDown;

if (cbo.DroppedDown) cbo.Focus();

}

 

Thanks,

Jeff

7 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 04 Apr 2016, 09:23 AM
Hello Jeff,

Thank you for writing.

You can use the AutoCompleteTextBox TextChanged event and close the popup. You can subscribe the event like this:
radCheckedDropDownList1.CheckedDropDownListElement.AutoCompleteEditableAreaElement.AutoCompleteTextBox.TextChanged+=TextBoxItem_TextChanged;

If the autocomplete drop-down is shown and the drop-down button is clicked the items drop-down will be shown and the autocomplete drop-down will be automatically closed.

Please do not hesitate to contact us with any additional questions or concerns. 
 
Regards,
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Jeff
Top achievements
Rank 1
answered on 08 Dec 2016, 03:48 PM

Hello There,

 

I am  running into an odd issue with this checked box.

 

I have attached a sample piece of code (64 bit) to demonstrate the issue.  What I want is the functionality of the combobox when I type. If I open the dropdown and then start using the textbox portion with the added part for the combobox I have it so it closes the drop down.   Where as with the checked dropdown it is not the case.

 

Also I have noticed when using a datasource sometimes the popup shows for the checked dropdown and other times(lists) it does not and I can't see any difference in the settings of the checked dropdown.

 

 

0
Jeff
Top achievements
Rank 1
answered on 08 Dec 2016, 03:52 PM

I just saw no zips allowed. 

Here is quick screen shot.

Both dropdowns are set to suggest and append for the autocomplete and set to list. 

0
Jeff
Top achievements
Rank 1
answered on 08 Dec 2016, 03:52 PM
The screenshots failed to attach.
0
Jeff
Top achievements
Rank 1
answered on 08 Dec 2016, 03:53 PM
Screen1
0
Jeff
Top achievements
Rank 1
answered on 09 Dec 2016, 02:06 PM

Nevermind.

 

I solved the issue..  It had to do with the minimum popup size being set to 0,0.

0
Dimitar
Telerik team
answered on 12 Dec 2016, 10:42 AM
Hi Jeff,

I am glad that you have found a solution for this. Please do not hesitate to contact us with any additional questions or concerns. 

Regards,
Dimitar
Telerik by Progress
Telerik UI for WinForms is ready for Visual Studio 2017 RC! Learn more.
Tags
CheckedDropDownList
Asked by
Jeff
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Jeff
Top achievements
Rank 1
Share this question
or