ComboBox LoadOnDemand with Checkbox Mutliple Selection not working

4 posts, 0 answers
  1. Klaus
    Klaus avatar
    4 posts
    Member since:
    May 2013

    Posted 10 Jul 2013 Link to this post


    I am trying to implement a RadComboBox with a datasource that can have up to 2,000 items. Therefore it is import that all the items do not get loaded at once. However I also want a RadComboBox with checkboxes, and I want to be able to select multiple values. The issue I am running into is when I have EnableLoadOnDemand="true" the checkboxes that were checked when searching for one word do not persist.

    As an example: If I search for "Apple" check that off and then search for "Zinc" check that off and search for "Apple" again, the checkbox for "Apple" will not appear checked off. This happens even if open the drop down and check of the first 5 items then search for something that's not being displayed in the dropdown, or something that is being displayed, it doesn't change the behavior, check that off and then go back to the original 5 items and they appear unchecked.

    The issue doesn't appear to happen if EnableLoadOnDemand="false" however then the ComboBox control will try and load all 2,000 items and the page will start slowing down.

    I want to know if there is a way to get this behavior either with EnableLoadOnDemand="true" or if its possible to limit how many items are displayed when EnableLoadOnDemand = "false". Also note that the OnItemsRequested event does not get raised when EnableLoadOnDemand is set to False.


    <telerik:RadComboBox ID="RadComboBox2" runat="server" Visible="true"  MaxHeight="330" Width=" 200px"
                                    Label="Look up values:" filter="Contains" AutoPostBack="false" EnableLoadOnDemand="true" EmptyMessage="Search Code..."
                                    OnItemsRequested="RadComboBoxLargeLookup_ItemsRequested" ShowMoreResultsBox="true" ItemsPerRequest="50" EnableViewState="true">
                                            <td><input type="checkbox" /></td>
                                            <td><asp:Label runat="server" id="asdfasdf" Text='<%# DataBinder.Eval(Container, "Text")%>' /></td>

    Code Behind:

    protected void RadComboBoxLargeLookup_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
                    DataTable data = (DataTable)(this.ViewState["LookupValues"]);
                    int itemOffset = e.NumberOfItems;
                    int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count);
                    e.EndOfItems = endOffset == data.Rows.Count;
                    for (int i = itemOffset; i < endOffset; i++)
                        RadComboBoxItem item = new RadComboBoxItem();
                        string name = data.Rows[i]["SortField"].ToString();
                        string code = data.Rows[i]["Code"].ToString();
                        item.Text = name;
                        item.Value = code;
                        RadComboBox radComboBox = sender as RadComboBox;
                catch (Exception ex)

    Final goal is to allow the user to select multiple options and retain the ones that were selected that are not being displayed in the dropdown.

    I also set EnabledViewState="true" per a recommendation on another support item, but that did not do anything.

    Any advice is appreciated.


  2. Dimitar Terziev
    Dimitar Terziev avatar
    1268 posts

    Posted 15 Jul 2013 Link to this post

    Hi Klaus,

    Thank you for contacting Telerik support.

    The reason why you are experiencing issues with the Check Box support in LoadOnDemand scenarios is cause by the fact that these two features are not intended to work together and therefore their simultaneous usage is not supported as outlined the following help article here. In order to have loading on demand and multiple selection my suggestion is to try the RadAutoCompleteBox control which support these feature of the box and it's designed for such particular scenarios.

    Hope this information would be helpful.

    Dimitar Terziev
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. arun
    arun avatar
    4 posts
    Member since:
    Sep 2010

    Posted 27 Jun 2014 Link to this post

    Is there any possibility that this support is in the works or will be added in the future.

  4. Nencho
    Nencho avatar
    1888 posts

    Posted 02 Jul 2014 Link to this post

    Hello Arun,

    This simultaneous usage of both features will not be implemented, since RadComboBox's items loaded on demand are not accessible on the server, which on the other hand is needed for the CheckBox feature. However, you could use ItemTemplate, along with LoadOnDemand enabled and place the checkboxes in the template.

    I would suggest you to refer to the following forum thread, where this functionality is discussed and a sample projects are provided:


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top