ComboBox with load on demand and checkboxes.

2 posts, 0 answers
  1. Water
    Water avatar
    13 posts
    Member since:
    Jan 2012

    Posted 30 May 2013 Link to this post

    I have a ComboBox on my page which is using autocomplete and load on demand to search through a database table containing 50,000 names:

    <telerik:RadAjaxPanel runat="server" ID="RadAjaxPanel2">
       <telerik:RadComboBox ID="RadComboBox2" runat="server"
                        Width="300" Height="300" Label="Select people:" EmptyMessage="Type a persons name"
                        AllowCustomText="true" MarkFirstMatch="True"
                        DataSourceID="SqlDataSource2" DataTextField="Name"
                        DataValueField="Name" Filter="Contains"
                        EnableAutomaticLoadOnDemand="True" EnableVirtualScrolling="true" ItemsPerRequest="15"

    This works fine if I want to select one item however I would like the user to be able to select multiple items, E.g. the user searches for John and is able to select several people called John. It doesn't need to retain the selected items between multiple searches.

    If I add in a Checkboxes="True" attribute, the control starts acting strangely. The textbox keeps clearing as I type and the selected items are cleared when I try to post back the page. Is there a way to make this work?
  2. msigman
    msigman avatar
    141 posts
    Member since:
    Apr 2008

    Posted 14 Jun 2013 Link to this post

    Hi Water,

    Check this online example. The first combobox in the example uses template and loads its items on demand. You can add checkboxes in the template in your page. From this previous post:
Back to Top