SMART datagrid v.1 > Classes > GridColumn
The style set name registered as registerColumnStyles in grid.
This style set is used as the most basic styles when draw column cells. In other words, the style properties which specified in column Style or other dynamic styles will take precedence.
You can make dynamic style effect by registering various styles and changing this property based on conditions during run time.
grid.registerColumnStyls({
yellow: {
background: '#ff0',
color: '#333'
},
red: {
background: '#f00',
color: '#fff'
}
]);
$('#btnChangeColor').click(function () {
var col = grid.columnByName('price');
if (limit > 100) {
col.setStyleName('red');
} else {
col.setStyleName('yellow');
}
});