Hi,
Using the RadGrid in Batch Editing mode and the EditType is set to row.
I use pagination and to avoid to loose data when I navigate between pages, I save the data on the client in "sessionStorage" (See Attach file).
I try to use the function "changeCellValue" in event "OnGridCreated" but it doesn't work.
Question: Which event schould I use to set the cells from grid with the values from the sessionStorage, please ? or should I use another method ?
Thank you
function
GridCreated(sender, eventArgs) {
var
values = JSON.parse(sessionStorage.getItem(
"editedValues"
));
if
(values) {
var
masterTable = sender.get_masterTableView();
var
batchEditingManager = sender.get_batchEditingManager();
var
rows = masterTable.get_dataItems();
for
(
var
i = 0; i < rows.length; i++) {
var
row = rows[i];
var
mandant = row.get_element().cells[0].innerHTML;
for
(
var
key
in
values) {
var
id = key.split(
"#"
);
if
(id[0] == mandant) {
var
cell = row.get_cell(id[1]);
batchEditingManager.changeCellValue(cell, values[key]);
}
}
}
}
}