SMART datagrid v.1 > Classes > GridRowStyles

Back  Forward

DataLudi.GridRowStyles.assign  method

It removes the specified styles and adds the style of each data row and each range at the same time. 

function assign (source: Object);
Returns
Void
Parameters
source - Object. required.
Code -1
    grid.body().rowStyles().assign({
        // Specify by each data row.
        '0': { background: '#10ff0000' },
        '1': { background: '#20ff0000' },
        '2': { background: '#30ff0000' },
        // You can specify by each range.
        'rows': [{
            'name': 'range01',  // If specify name, you can remove it later or set it again.
            'range': 'row % 2 == 1',
            'styles': { background: '#080000ff'}
        }]
    });
See Also
setRange
setRow
clearRanges
clearRows
GridBody.rowStyles
Examples
Row Styles