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

Dont load all items on demand

1 Answer 69 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Asad
Top achievements
Rank 1
Asad asked on 23 Sep 2013, 06:35 AM
I have implemented my combo box easily and it is serving me greatly. below is my combo box code

<telerik:RadComboBox runat="server" ID="ddlProjectTaskSubtask" Filter="Contains" ShowToggleImage="false"
                        DropDownWidth="130px" Style="background: none" Width="130px" MinFilterLength="2" ></telerik:RadComboBox>
All my combo box items are displayed in drop down on page load... now what i want is that those items shouldn't appear on page load and drop down list should be empty until user enters some characters in combo box... after user enter characters, only filtered items should be displayed in drop down.

EDIT: I appologize for the wrong title of this post, i am not finding any option to edit it.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Sep 2013, 11:18 AM
Hi Asad,

You can set the EnableAutomaticLoadOnDemand property of the RadComboBox to true in order to achieve your requirement. Please check the sample code which works as expected.

ASPX:
<telerik:RadComboBox ID="RadComboBox1" runat="server" Skin="Web20" ShowToggleImage="false"
    Width="130px" DataSourceID="SqlDataSource1" EnableAutomaticLoadOnDemand="true"
    EmptyMessage="Select" Filter="Contains" MinFilterLength="2" DataTextField="ProductName">
</telerik:RadComboBox>
<asp:SqlDataSource runat="server" ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
    ProviderName="System.Data.SqlClient" SelectCommand="SELECT [ProductName] FROM [Products] ORDER By ProductName" />

Thanks,
Shinu.
Tags
ComboBox
Asked by
Asad
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or