SMART datagrid v.1 > Classes > GridRowStyles

Back  Forward

DataLudi.GridRowStyles.setRange  method

It sets Style Set about the data rows which belong to a specific range. 

This style will be applied to all data cells which have been contained in the range of these data rows. You can specify the expression in range parameter, and use row variable which has data row number. In addition, if specify name parameter, you can reset or delete by this name later. 

If do not specify range or styles parameter, it will remove the existing style setting which has been set as name

function setRange (name: String, range: String, styles: Object|Styles);
Returns
Void
Parameters
name - String.
range - String. required.
styles - Object|Styles. required.
Code -1
    grid.body().rowStyles().setRange('range1', {
        range: 'row % 2 == 1',
        styles: {
            background: '#10ff0000'
        }
    });
    
    // Remove the existing setting.
    grid.body().rowStyles().setRange('range1', null);
See Also
setRow
clearRanges
clearRows
assign
rowStyles
Examples
Row Styles