problem with dropdownlist in from template in edit mode

2 posts, 0 answers
  1. karyjon
    karyjon avatar
    6 posts
    Member since:
    Oct 2012

    Posted 26 Sep 2009 Link to this post


    i have a telerik grid with this specification

    <telerik:RadGrid ID="RadGrid1" runat="server"  GridLines="None"
              ...  DataSourceID="sqlBranchList" OnItemDeleted="RadGrid1_ItemDeleted"
               OnItemUpdated="RadGrid1_ItemUpdated" OnItemCommand="RadGrid1_ItemCommand"
                OnPreRender="RadGrid1_PreRender" Skin="Sunset">
                <MasterTableView CommandItemDisplay="TopAndBottom" DataSourceID="sqlBranchList"
                       -- Some column with Update/Insert/delete button -- 
                    <EditFormSettings EditFormType="Template">
                <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
                            <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="0" rules="none"
                                style="border-collapse: collapse; background: white;">

                                                <asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="true"  DataSourceID="sqlSRVUserlist" DataTextField="userName" DataValueField="userID" >
                                               <asp:ListItem Selected="True" Text="Select" Value=""></asp:ListItem>

    so i have dropdownlist in editform that fill with this datasource :

    <asp:SqlDataSource ID="sqlSRVUserlist" runat="server"
            ConnectionString="<%$ ConnectionStrings:eosWebConnectionString %>"
            SelectCommand="prcUserList" SelectCommandType="StoredProcedure">
       and i have this datasource for my grid.
        <asp:SqlDataSource ID="sqlBranchList" runat="server"
            ConnectionString="<%$ ConnectionStrings:eosWebConnectionString %>"
            SelectCommand="prcSearchBrnach" SelectCommandType="StoredProcedure"
            DeleteCommand="prcDeleteBranch" DeleteCommandType="StoredProcedure"
            InsertCommand="prcAddBranch" InsertCommandType="StoredProcedure"
            UpdateCommand="prcUpdateBranch" UpdateCommandType="StoredProcedure">
                <asp:Parameter DefaultValue="1" Name="branchStatus" Type="Int32" />
                <asp:Parameter Name="branchID" Type="Int32" />
                <asp:ControlParameter ControlID="DropDownList1" Name="userID"
                    PropertyName="SelectedValue" Type="Int32" />
                <asp:Parameter Name="branchStatusID" Type="Int32" DefaultValue="1" />
                <asp:Parameter Name="branchID" Type="Int32" />
                <asp:Parameter Name="branchName" Type="String" />
                <asp:ControlParameter  Name="userID"  ControlID="RadComboBox1"
                        PropertyName="SelectedValue" Type="Int32" />
                <asp:Parameter Name="branchStatusID" Type="Int32" DefaultValue="1" />
                <asp:Parameter Name="branchName" Type="String" />

    but when i want to update a row this error is occurred:

    Could not find control 'DropDownList1' in ControlParameter 'userID'


    i think telerik grid in edit form mode can not find controls on the page.

    please help me.
  2. Martin
    Martin avatar
    810 posts

    Posted 01 Oct 2009 Link to this post

    Hello Karyjon,

    You can use Automatic DataSource operations. I am attaching a sample project demonstrating this approach. You can also review this online demo for more details.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft R3 2016 release webinar banner
Back to Top