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

EnableAutomaticLoadOnDemand within a DetailsView

1 Answer 51 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 25 Oct 2010, 05:17 PM
I have a RadComboBox within the ItemTemplate of a DetailsView. When using EnableAutomaticLoadOnDemand, all records are initially loaded into the ComboBox. The same ComboBox initially loads no records if I move it outside the DetailsView. Is this a bug with DetailsView? Any known workarounds? I'd rather not use EnableLoadOnDemand and have to code each ComboBox. Code for the offending page is below. There is no code behind for this page.

On edit: looks like updating to the latest version fixed it.
<%@ Page Language="VB" AutoEventWireup="false" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head id="Head1" runat="server">
    <title>Test</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager2" runat="server" />
        <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataKeyNames="UName" DataSourceID="DetailsViewDataSource">
            <Fields>
                <asp:TemplateField>
                    <ItemTemplate>
                        <telerik:RadComboBox runat="Server" ID="RadComboBox2" EmptyMessage="Select a User" DataSourceID="ComboBoxDataSource" DataValueField="Key" DataTextField="UName" Width="325px" EnableAutomaticLoadOnDemand="true" ItemsPerRequest="10" ShowMoreResultsBox="True" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Fields>
        </asp:DetailsView>
         <asp:SqlDataSource ID="ComboBoxDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" ProviderName="System.Data.SqlClient" SelectCommand="Select UName, Key From User" >
             </asp:SqlDataSource>
        <asp:SqlDataSource ID="DetailsViewDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:MyConnectionString %>" ProviderName="System.Data.SqlClient" SelectCommand="SELECT UName From User WHERE Key = 1" >
             </asp:SqlDataSource>
    </form>
</body>
</html>

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 01 Nov 2010, 02:42 PM
Hi Derek,

I tried to reproduce the issue using the code provided, but unfortunately without success.
Could you please find the test page attached and give it a try?
Maybe there is something different in your implementation that causes the issue?

All the best,
Kalina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Derek
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or