SMART datagrid v.1 > Classes > ColumnGroup

Back  Forward

DataLudi.ColumnGroup.columnByName  method

Return the first GridColumn which has the same name property value as parameter name. If not exist, it will return null

function columnByName (name: String): GridColumn;
Returns
GridColumn
Parameters
name - String. required.
Code -1
    var group = grid.focusedIndex().group();
    if (group) {
        var col = group.columnByName('colAddr');
        if (col) {
            col.styls().setBackground('#30ff0000');
        }
    }
Note
name of column must be the only one among all columns included in grid, and must not be null or an empty string.
The grid does not check uniqueness of name.
See Also
GridColumn.name
GridColumn
Examples
Column Grouping