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

Need to modify new cell value in onBatchEditCellValueChanging

1 Answer 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 24 May 2017, 08:11 PM
I'm working with the RadGrid in Batch mode and I would like to be able to evaluate a cell's value and possibly modify it and write it back to the cell (from 4 to 4:00, for example).  I've been trying to do this in the onBatchEditCellValueChanging event where I can easily read the new value but I have had no luck overriding it.  Any help or javascript samples will be greatly appreciated.

1 Answer, 1 is accepted

Sort by
0
Stephen
Top achievements
Rank 1
answered on 24 May 2017, 08:48 PM

I figured it out and am posting here: 

function onBatchEditCellValueChanged(sender, args) {
            var grd = sender;
            var batchManager = grd.get_batchEditingManager();
            var colName = args.get_columnUniqueName();            
            var dataItem = $find(args.get_row().id);
            var idCell = dataItem.get_cell(colName);
            batchManager.changeCellValue(idCell, '4:00');
 
        }
Tags
Grid
Asked by
Stephen
Top achievements
Rank 1
Answers by
Stephen
Top achievements
Rank 1
Share this question
or