SMART datagrid v.1 > Classes > DynamicStyleImpl
The list of styles.
If pass the judgment which has been specified by callback or expression, the properties which have been specified in this list will be reflected.
grid.setColumns([{
name: "category",
fieldName: "category",
width: 100,
styles: { textAlignment: "far" },
dynamicStyles: [{
callback: function (scope) {
return !scope.value() || !scope.value().match(/Damag/i);
},
styles: {
"background": "#1100ff00"
}
}],
header: { text: "Category" }
},
...
]);