SMART datagrid v.1 > Classes > CellStyleManager
It individually sets CellStyle settings which are transferred by parameter rows in data cells. It can be an array of arrays or array of JSON object. In each item, Style ID registered in grid should be contained as a value.
In fieldMap, it will set to apply the style setting value of which location of rows to which field of data set. In the case of array, it will specify as Array index -> field, and in the case of JSON object, it will specify as JSON property -> field.
It resets the state of editor of data cell in which has displayed editor and draws the grid again.
// 'style01' is CellStyles which have been registered in grid.
var rows = [
[ 'style01', 'style02' ],
[ 'style03', 'style04' ]
];
grid.loadStyleRows(rows, {
'0': 'country', // Specify 'style01' of the 0th item value of the first row of above rows as CellStyle id of DataSet 'country' field.
'1': 'currency'
})
Specify as array of JSON object.
var rows = [{
'style_country': 'style02',
'style_currency': 'style01'
}, {
'style_country': 'style03',
'style_currency': 'style02'
}];
grid.styleManager().loadStyleRows(rows, {
'style_country': 'country', // Specify 'style02' of 'style_country' property value of above rows as style ID of 'country' field cell.
'style_currency': 'currency'
}, 3) // Apply from the 4th DataSet row