How to Save Items from a Batch Editing when I change manually the columns values

2 posts, 0 answers
  1. JOSE LUIZ TORDINO
    JOSE LUIZ TORDINO avatar
    3 posts
    Member since:
    Nov 2014

    Posted 02 May 2018 Link to this post

    I have a problem with batch grid mode.
    I have a RadDatePicker in <HeaderTemplate> as the example below:
    <telerik:GridTemplateColumn UniqueName="dtLimite" HeaderText="Data Limite" HeaderStyle-Width="90px"
                                Visible="true" AllowFiltering="False" DataField="dtLimite" HeaderStyle-HorizontalAlign="Center"
                                ColumnGroupName="Datas" ItemStyle-HorizontalAlign="Center">
                                <HeaderTemplate>
                                    <div>
                                        <asp:Label Text="Limite" runat="server" />
                                    </div>
                                    <telerik:RadDatePicker ID="dpLimite" runat="server" ToolTip="Alterar Todas" DateInput-DisplayText="Alterar Todas"
                                        Skin="Bootstrap" class="form-control" MinDate="01/01/1910" AutoPostBack="true" Width="150px"
                                        OnSelectedDateChanged="dpLimite_SelectedDateChanged1"  >                                         
                                                        </telerik:RadDatePicker>
                                </HeaderTemplate>
                                <ItemTemplate><telerik:RadDatePicker ID="dpLimite2" runat="server" Skin="Bootstrap" AutoPostBack="false" class="form-control" MinDate="01/01/1910" SelectedDate='<%# Eval("dtLimite") %>'></telerik:RadDatePicker>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <telerik:RadDatePicker ID="dpLimite1" runat="server" Skin="Bootstrap" AutoPostBack="false" class="form-control" MinDate="01/01/1910"></telerik:RadDatePicker>
                                </EditItemTemplate>
                            </telerik:GridTemplateColumn>
          
          
    In the OnSelectedDateChanged = "dpLimite_SelectedDateChanged1" component´s event,
    I change the value of the cells of all the other lines ( this is working the exchange of dates ),
    and I need the grid to recognize that these changes were made and that at the time of saving the batch
    all lines are in edit mode, which is not happening.
    I need this done not only with the date columns, but also with the Check columns,
    as you can see.
    The check , uncheck and modify date functionality work, the problem is that the grid does not recognize this change.
    There is a possibility?
  2. Eyup
    Admin
    Eyup avatar
    3860 posts

    Posted 07 May 2018 Link to this post

    Hi José,

    Every postback action with Batch editing will clear the unsaved changes. Therefore, you can switch to InPlace edit mode instead:
    https://demos.telerik.com/aspnet-ajax/dropdowntree/examples/applicationscenarios/dropdowntreeingrid/defaultcs.aspx?product=grid
    https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-editing/edit-mode/in-place

    Batch editing is based fully on client-side and it is essentially different than other server-side modes:
    http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/rows/accessing-cells-and-rows#accessing-controls-in-batch-edit-mode


    If you decide to keep using Batch editing, you can get some ideas from the samples provided here:
    https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/events/onbatcheditopened

    I hope this will prove helpful.

    Regards,
    Eyup
    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