I have a LinqDataSource and a RadComboBox set up, so that the combobox shows the query results on demand. The table has 1000 or so rows and it takes a lot of time to load that page because for some reason RadComboBox keeps loading everything.
So what is wrong with the code below? I have nothing regarding cbAuto in the code-behind file
So what is wrong with the code below? I have nothing regarding cbAuto in the code-behind file
<asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="Webshop.Entities" EntityTypeName="" OrderBy="Name, FromDate, TillDate" Select="new (AutoID, Name, FromDate, TillDate, Comment)" TableName="Autos"></asp:LinqDataSource><telerik:RadComboBox ID="cbAutos" runat="server" Width="900px" DropDownWidth="900px" EmptyMessage="Chosse an autotype" HighlightTemplatedItems="True" Filter="Contains" LoadingMessage="Loading..." DataTextField="Name" MaxHeight="300px" DataValueField="AutoID" ShowDropDownOnTextboxClick="False" DataSourceID="LinqDataSource1" EnableLoadOnDemand="True" EnableVirtualScrolling="True" ItemsPerRequest="100"> <HeaderTemplate> <table style="width: 850px;"> <tr> <td style="width: 300px;">Autotype</td> <td style="width: 100px;">Date (from)</td> <td style="width: 100px;">Date (till)</td> <td style="width: 150px;">Comment</td> </tr> </table> </HeaderTemplate> <ItemTemplate> <table style="width: 850px;"> <tr> <td style="width: 300px;"> <%# DataBinder.Eval(Container.DataItem, "Name")%> </td> <td style="width: 100px;"> <%# DataBinder.Eval(Container.DataItem, "FromDate")%> </td> <td style="width: 100px;"> <%# DataBinder.Eval(Container.DataItem, "TillDate")%> </td> <td style="width: 150px;"> <%# DataBinder.Eval(Container.DataItem, "Comment")%> </td> </tr> </table> </ItemTemplate> </telerik:RadComboBox>