SMART datagrid v.1 > Classes > DynamicStyleImpl

Back  Forward

DataLudi.DynamicStyleImpl.expression  property

The expression 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 callback property instead. 

Getter
function expression(): String
Setter
function setExpression(value: String)
Code -1
    grid.setColumns([{
        name: "category",
        fieldName: "category",
        width: 100,
        styles: { textAlignment: "far" },
        dynamicStyles: [{
            expression: "value not ilike '%Damage%'",
            styles: {
                "background": "#1100ff00"
            }
        }],
        header: { text: "Category" }
    },
    ...
    ]);
See Also
callback
DataColumn.dynamicStyles
GridBody.cellDynamicStyles
GridBody.rowDynamicStyles
Examples
Column Dynamic Styles
DefaultDynamicStyles