RadComboBox Multi-select with unsupported Filter

3 posts, 0 answers
  1. Trey
    Trey avatar
    6 posts
    Member since:
    Sep 2012

    Posted 20 Sep 2013 Link to this post

    We have been using RadComboBox with Multi-select, Filter, and MarkFirstMatch. I just now realized that this is unsupported:

    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"
            <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" />

    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. Trey
    Trey avatar
    6 posts
    Member since:
    Sep 2012

    Posted 23 Sep 2013 Link to this post

    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.
  3. DevCraft R3 2016 release webinar banner
  4. Juan Carlos
    Juan Carlos avatar
    3 posts
    Member since:
    Jun 2016

    Posted 03 Jun in reply to Trey Link to this post


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

    AllowCustomText = "true"

Back to Top