As I mentioned in a previous post
The BatchEditingManager has getCellValue and changeCellValue methods, but I think they are unreliable in some situations.
changeCellValue doesn't write directly to the table cell. It opens the cell for editing, sets the value, then closes the cell. This behaviour is not acceptable when setting a value to a cell of the currently being edited row. When I call the function, the whole row is closed.
I have scenarios in which I want to change the value of a read only cell when the row is open. For example, I have a grid with two columns, code, and name, with the name cell containing a search box that sets the value of the code cell when the user chooses an item.
At last, I had to write my setCellValue function as follows:
(columnUniquName, dataItem, value)
tableView = dataItem.get_owner(),
cell = tableView.getCellByColumnUniqueName(dataItem, columnUniquName);
valueDiv = cell.querySelector(
valueTextElement = valueDiv? valueDiv.childNodes:
valueTextElement.textContent = value;
valueDiv.innerHTML = value;
cell.innerHTML = value;
Which is hacky because it depends on the internal undocumented structure of the grid.
I hope a better alternative will be provided in the future.