This is a migrated thread and some comments may be shown as answers.
ComboBox with load on demand and checkboxes.
1 Answer 67 Views
This is a migrated thread and some comments may be shown as answers.
Water
Top achievements
Rank 1
Water asked on 30 May 2013, 03:09 PM
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"
    />
 
</telerik:RadAjaxPanel>

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?

1 Answer, 1 is accepted

Sort by
0
msigman
Top achievements
Rank 2
answered on 14 Jun 2013, 07:00 PM
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: http://www.telerik.com/community/forums/aspnet-ajax/combobox/check-boxes-in-combo-box-with-load-on-demand.aspx.
Asked by
Water
Top achievements
Rank 1
Answers by
msigman
Top achievements
Rank 2
Share this question
or