Sets or retrieves the grid cells data. The data is assigned to the individual cell or to the array of cells depending on the type and the number of arguments in the setCellData() method (see the examples below).
The text in the grid cell is produced by applying the cell format over the cell data property. This allows encoding the html control characters (<, >, ", &) in the text strings or converting numbers and dates into specific display formats. It is more efficient to assign the content directly to the cell text property (instead of the cell data + cell format) if the client-side transformation is not required.
var value = obj.getCellData();
obj.setCellData(value);
obj.onCellDataChanging = function(value){...};
obj.onCellDataChanged = function(value){...};
obj.onCellDataError = function(value){...};
Javascript array
var myCells = [
["Item <1>", "1234.56", "2004-05-18"],
["Item 1 & 2", "9876543", "2006-02-08"]
]
obj.setCellData(myCells);
Function
obj.setCellData(function(col, row){return myCells[row][col]});
Single cell
obj.setCellData("Item <1>", 0, 0); // col-0, row-0
Overview: using format converters
Grid templates: cell
Cell model: text, image, tooltip, link, value, format, editable, state, selected
Data properties: selector, header, footer, top, bottom