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
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.
Dimitar
Telerik
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.
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.
Nevermind.
I solved the issue.. It had to do with the minimum popup size being set to 0,0.
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