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

[Solved] Grid - Batch Editing - modify cells and set records to edited

1 Answer 285 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 15 Aug 2013, 06:21 PM

I am using a Radgrid in Batch Editing Mode (example)

I am trying to allow an end user to apply a value to a column for all records listed.

For example I have 3 columns named 1 2 & 3, and we have 10 records showing in the grid. I want the End User to be able to apply a value which is determined outside the grid to all 10 records in column 2.

The problem is that when I am using the grid in batch editing mode, I need to somehow tell the grid which cells have been edited so that the red triangle in the top left corner of the cells show up once a cell has been edited. The goal is to not apply the changes until the End User clicks the save button attached to the grid.

I have placed an arrow on the save button and an arrow pointing at the red triangle which indicates that a cell has been modified.


I have a button outside of the grid which attempts to set the value to the ACT Arrival column for all records.

Here is the code behind that button

 

So, I want to edit all cells in a given column for all records and mark all records that have been modified as ready to process in batch.

I appreciate any assistance that can be offered and will reply quickly to questions.

1 Answer, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 20 Aug 2013, 04:19 PM
Hello Mike,

There are a two things you should note when setting the EditMode to Batch.
  1. Only one editor is initialized for the entire column and it is being reused. This is done for optimization purposes.
  2. When a postback is triggered all changes made by the user will be lost.
In order to fully meet your requirements once a value in one of the cells is changed you should traverse the other cells and manually change the value. For achieving this only client-side logic should be used.

Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Share this question
or