SMART datagrid v.1 > Classes > GridBase

Back  Forward

DataLudi.GridBase.columnByField  method

Return the first Column connected to DataField specified by field

field can be the field index or field name. If ignoreCase is true when specifying as field name, it will not be case sensitive. You can get all column list connected to one field through columnsByField

function columnByField (field: Integer|String, ignoreCase: Boolean): GridColumn;
Returns
GridColumn
Parameters
field - Integer|String. required.
The field index or field name.
ignoreCase - Boolean. Defaults to false.
When specify the field name in field, if it is true, it will not be case sensitive.
Code -1
    $('#check').click(function () {
        var column = grid.columnByField('fldAddr');
        if (column) {
            column.setStyles({
                background: '#1000ff00'
            }
        }
    });
See Also
columnsByField
columnByName
GridColumn
DataField