SMART datagrid v.1 > Classes > DynamicStyleCase

Back  Forward

DataLudi.DynamicStyleCase.expressions  property

The expression list which determines whether to apply the style. 

The expression is shown by the grammar of SMART datagrid itself. Please refer to Expression Overview topic. In order to use JavaScript, it will use callbacks property instead. 

Getter
function expressions(): [String]
Setter
function setExpressions(value: [String])
Code -1
    var columns = [{
        name: 'colQty',
        fieldName: 'quantity',
        dynamicStyles:[{
            expressions: [
                "row % 5 == 0",
                "row % 3 == 0"
            ],
            styles: [{
                shapeSize: size1,
                numberFormat: fmt1
            }, {
                shapeSize: size2,
                numberFormat: fmt2
            }]
        }]
    },
    ...
    ];
    grid.setColumns(columns);
See Also
callbacks
styles
DataColumn.dynamicStyles
GridBody.cellDynamicStyles
GridBody.rowDynamicStyles
Examples
Column Dynamic Styles
Default Dynamic Styles