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

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

1 Answer 657 Views
Grid
This is a migrated thread and some comments may be shown as answers.
JOSE LUIZ TORDINO
Top achievements
Rank 1
JOSE LUIZ TORDINO asked on 02 May 2018, 09:47 PM
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?

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 07 May 2018, 08:50 AM
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.
Tags
Grid
Asked by
JOSE LUIZ TORDINO
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or