SMART datagrid v.1 > Classes > GridBase
Individually set CellStyle settings being transferred by parameter dataRowindicies in data cells. It can be array of arrays or array of JSON object. In each item, Style ID being registered in grid should be in as the value.
In fieldMap, it will set to select the style setting value of which location in dataRowindicies and apply in which field of data set. In the case of array, it will specify Array index -> Field, and in the case of JSON object, it will specify JSON property -> Field.
Reset the state of editor of data cell in which was displaying the editor and redraw the grid.
// CellStyle of being registered in grid such as 'style01', etc.
var rows = [
[ 'style01', 'style02' ],
[ 'style03', 'style04' ]
];
grid.setCellStyleRows(rows, {
'0': 'country', // Specify the 0th item value 'style01' of first row among above rows as CellStyle id of 'country' field of DataSet.
'1': 'currency'
})
Specify by array of JSON object.
var rows = [{
'style_country': 'style02',
'style_currency': 'style01'
}, {
'style_country': 'style03',
'style_currency': 'style02'
}];
grid.setCellStyleRows(rows, {
'style_country': 'country', // Specify 'style02' of 'style_country' property value among above rows as style id of 'country' field cell.
'style_currency': 'currency'
}, 3) // Apply from the fourth DataSet row.