SMART datagrid v.1 > Classes > DynamicStyleImpl
JavaScript callback function which determines whether to apply the style.
scope is different depending on the target in which apply this dynamic style. In general, in the case of applying to the data cell, they will become ValueCell objects like DataCell. The type of scope cell of each column type has been listed as below.
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" }
},
...
]);