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

RadComboBox Multi-select with unsupported Filter

2 Answers 171 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Trey
Top achievements
Rank 1
Trey asked on 20 Sep 2013, 11:34 PM

We have been using RadComboBox with Multi-select, Filter, and MarkFirstMatch. I just now realized that this is unsupported:
http://www.telerik.com/help/aspnet-ajax/combobox-usability-checkboxes.html

Even though it is unsupported, it almost works perfectly. The only issue that I've noticed is that after you check a single item, navigate away, and then come back and select additional items, the textbox is not updated with the newly selected items. For example:

<telerik:RadComboBox runat="server" ID="testComboBox"
    CheckBoxes="true" EnableCheckAllItemsCheckBox="true" CheckedItemsTexts="FitInInput"
    EmptyMessage="Select Numbers" AutoPostBack="false" Filter="Contains"
    MarkFirstMatch="true" NoWrap="true" EnableLoadOnDemand="false"
    OnClientTextChange="OnClientTextChange">
    <Items>
        <telerik:RadComboBoxItem Value="1" Text="One" />
        <telerik:RadComboBoxItem Value="2" Text="Two" />
        <telerik:RadComboBoxItem Value="3" Text="Three" />
        <telerik:RadComboBoxItem Value="4" Text="Four" />
        <telerik:RadComboBoxItem Value="5" Text="Five" />
    </Items>
</telerik:RadComboBox>

That works well except if you select One, close the dropdown, come back and select Two and Three, when closing it the text will not display correctly- it will revent back to just displaying One. If I remove the Filter, then this issue doesn't occur. I realize that using a Filter is unsupported with multi-select, but coincidentally, if I set another unsupported option, EnableLoadOnDemand="true", then the problem is fixed! In fact, now the entire drop down functionally works perfectly, however, EnableLoadOnDemand="true" forces a postback when you start using the filter by typing into the textbox. This hinders the user's experience as filtering for the desired item(s) is now too slow since a postback occurs with every keypress.

So, my question is, is there any way to achieve the textbox refresh that EnableLoadOnDemand does without using EnableLoadOnDemand? Or, is there a nifty trick to prevent the postback with EnableLoadOnDemand without breaking the text filter? O, is there a supported way to have a multi-select dropdown with checkboxes and filtering?

2 Answers, 1 is accepted

Sort by
0
Trey
Top achievements
Rank 1
answered on 23 Sep 2013, 10:22 PM
I found that if I set AutoPostBack="true" and EnableLoadOnDemand="false", that after the PostBack the text of the DropDown is updated with the correct values. So, weighing between displaying the wrong text for a second before the refresh, and having slow filter text, I opted for the former and it is now "good enough".

Additional tip- you can grab the OnClientDropDownClosed event and trigger the postback there too if you'd like. It seems like many users expect the page to auto-update after the drop down closes, even though they haven't clicked off the control yet.
0
Juan Carlos
Top achievements
Rank 1
answered on 03 Jun 2016, 12:06 PM
Hello, 

Telerik said that checkboxes + filter is not supported but for me works perfectly if I add this propperty to radcombobox:

AllowCustomText = "true"

Regards.
Tags
ComboBox
Asked by
Trey
Top achievements
Rank 1
Answers by
Trey
Top achievements
Rank 1
Juan Carlos
Top achievements
Rank 1
Share this question
or