SMART datagrid v.1 > Classes > DataColumn

Back  Forward

DataLudi.DataColumn.dataIndex  property

index of DataField connected to this column. 

It returns -1 if not connected to the field. And, field name can be known by dataFieldName. Field connection is specified by fieldName or fieldIndex property. 

Getter
function dataIndex(): Integer
Code -1
    $('#getValue').click(function () {
        var col = grid.focusedIndex().column;
        if (col) {
            if (col.dataIndex() < 0) {
                alert('It is the column not connected to field.');
            } else {
                var v = ds.getValue(grid.focusedDataIndex(), col.dataIndex());
                $('#value').val(v);
            }
        }
    });
See Also
fieldName
fieldIndex
dataFieldName
DataField.index
Examples
HelloGrid