Dont load all items on demand

2 posts, 0 answers
  1. Asad
    Asad avatar
    2 posts
    Member since:
    Jul 2013

    Posted 23 Sep 2013 Link to this post

    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.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Sep 2013 Link to this post

    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.

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

Back to Top