Batch edit doesn't work when Save button click

3 posts, 0 answers
  1. Cheng-Chang
    Cheng-Chang avatar
    10 posts
    Member since:
    Nov 2014

    Posted 26 Apr 2018 Link to this post

    I am not sure what's wrong with save event in editmode=batch

    • when I click save, it doesn't fire RadGrid1_BatchEditCommand



    • even if I change the button to commandtemplate

    <telerik:RadPushButton runat="server" ID="SaveChangesButton" Text="儲存" OnClientClicked="saveChangesToGrid" AutoPostBack="false" CommandName="UpdateAll">
    <Icon CssClass="rgSaveIcon" />


    I click save and then browser doesn't response error and C# event doesn't fired event handler method. I am sure it has executed 


    following is my setting of grid:

    <telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" GridLines="Both" runat="server"
        <MasterTableView Name="Master"
            <BatchEditingSettings EditType="Cell" SaveAllHierarchyLevels="true" />
                <telerik:GridTableView DataKeyNames="itemno,seqno"
                    Width="100%" runat="server" >
        <ClientSettings AllowKeyboardNavigation="true"></ClientSettings>


  2. Cheng-Chang
    Cheng-Chang avatar
    10 posts
    Member since:
    Nov 2014

    Posted 26 Apr 2018 Link to this post

    From my perspective, batch edit in first way will trigger RadGrid1_BatchEditCommand, and the second will trigger RadGrid1_ItemCommand by javascript.

    Am I right?

  3. Attila Antal
    Attila Antal avatar
    523 posts

    Posted 26 Apr 2018 Link to this post

    HI Cheng-Chang,

    That is correct. The built-in button for saving the changes will trigger the BatchEditCommand while the button from the CommandItemTemplate with CommandName "UpdateAll" will trigger the ItemCommand event.

    I've tested the sample markup from below and both commands fire in both scenarios. If it does not fire at your end, I advise checking for JavaScript errors, or anything that could prevent the postback from happening.

    I would like to note that in case of using CommandItemTemplate with a button to save the changes, the button should be set to do a Postback. The current example prevents the postback, hence the ItemCommand event does not fire.

    If the issue still persist, please try to isolate the issue in a sample project and send it back to us for further investigation.

    Kind regards,
    Attila Antal
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top