SMART datagrid v.1 > Classes > GridBody

Back  Forward

DataLudi.GridBody.rowRangeStyles  property

GridRowStyles object which specifies style of each data row or row range. 

Please refer to GridRowStyles help about more details. 

Getter
function rowRangeStyles(): GridRowStyles
Setter
function setRowRangeStyles(value: Object|GridRowStyles)
Code -1
    grid.body().setRowRangeStyles({
        '11': { background: '#20ff0000' },
        'rows': [{
            'range': 'row % 2 == 1',
            'styles': { background: '#080000ff'}
        }],
        
        // If it is regardless of order, you can specify range beyond 'rows' array.
        'row > 10': { background: '#ff00ff00' }
    });
Code -2
    // It can also be loaded from GridBase.loadStyles.
    grid.loadStyles({
        body: {
            rowRange: {
                '11': { background: '#20ff0000' },
                'rows': [{
                    'range': 'row % 2 == 1',
                    'styles': { background: '#080000ff'}
                }],
                
                // If it is regardless of order, you can specify range beyond 'rows' array.
                'row > 10': { background: '#ff00ff00' }
            }
        }
    };
See Also
GridBase.loadStyles
GridRowStyles
GridStyles
Rendering Performance Improvement
Examples
Row Styles