SMART datagrid v.1 > Classes > DynamicStyleCase
The list of styles.
If pass the judgment which has been specified by callbacks or expressions, the properties which have been specified in this list will be reflected. If do not specify styles in the corresponding location of each item in callbacks or expressions, it will use the style set which has been set before.
var columns = [{
name: 'colQty',
fieldName: 'quantity',
dynamicStyles:[{
expressions: [
"row % 5 == 0",
"row % 3 == 0"
],
styles: [{
shapeSize: size1,
numberFormat: fmt1
}, {
shapeSize: size2,
numberFormat: fmt2
}]
}]
}, {
callbacks: [
function (cell) {
return cell.rowIndex() % 5 == 0;
},
function (cell) {
return cell.rowIndex() % 3 == 0;
}
],
styles: [{
shapeSize: size1,
numberFormat: fmt1
}, {
shapeSize: size2,
numberFormat: fmt2
}]
},
...
];
grid.setColumns(columns);