ItemCommand in RadGrid edit form not working

2 posts, 0 answers
  1. Marcus Eddy
    Marcus Eddy avatar
    26 posts
    Member since:
    Jun 2008

    Posted 14 Feb 2016 Link to this post

    I've a RadGrid where I'm using the edit form template editing mode, within a user control (Edit.ascx). The user control is part of a custom module for DNN. Whenever I click the Edit button in the generated edit column, the ItemCommand event triggers successfully, however the item command isn't triggered at all upon clicking the Update or Cancel buttons, instead the page posts back to another page control (View.ascx). The ItemCommand handler is a simple stub method; it does nothing.

    My grid markup is as follows:

    <telerik:RadGrid ID="RadGrid1" runat="server" DataSourceID="ObjectDataSource1" AutoGenerateColumns="False" DataKeyNames="UniqueID"
        GroupPanelPosition="Top" AllowAutomaticUpdates="True" AutoGenerateEditColumn="True" OnItemCommand="RadGrid1_OnItemCommand">
                <telerik:GridBoundColumn DataField="Address" HeaderText="Address" FilterControlAltText="Filter Address column" UniqueName="Address">
                <telerik:GridBoundColumn DataField="LandArea" HeaderText="Land Area" FilterControlAltText="Filter Land Area column" UniqueName="LandArea">
            <EditFormSettings EditFormType="Template">
                    <dnn:label ID="Label2" runat="server" Text="Land Area" />
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("LandArea") %>'></asp:TextBox>
                    <asp:CompareValidator ControlToValidate="TextBox1" runat="server" ErrorMessage="Numbers only please" Operator="DataTypeCheck" Type="Double"></asp:CompareValidator>
                    <dnn:label ID="Label3" runat="server" Text="Other features" /><br/>
                    <dnn:texteditor ID="otherFeatures" runat="server" Text='<%# Bind("OtherFeatures") %>'></dnn:texteditor>
                    <asp:LinkButton runat="server" ID="btnUpdate" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'></asp:LinkButton>
                    <asp:LinkButton runat="server" ID="btnCancel" CommandName="Cancel" CausesValidation="False" Text="Cancel"></asp:LinkButton>

    Interestingly, if I implement a similar set up using a standard ASP GridView, the commands work correctly, as expected. However, this doesn't allow me to customise the form as does the RadGrid. Any ideas? I first used the version of Telerik.Web.UI provided with DNN (2013.2.717.40), however upon upgrading to the latest version (2016.1.113.45), the behaviour doesn't change.

  2. Kostadin
    Kostadin avatar
    1733 posts

    Posted 17 Feb 2016 Link to this post

    Hello Marcus,

    I am afraid we stop supporting DNN since Q2 2013 version of the controls. In case the issue is observed only when using a DNN modules I would suggest you to post your question in their forums.

    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 Feedback Portal and vote to affect the priority of the items
Back to Top