Skip to main content
A newer version of this page is available. .

ASPxClientGridView.GetColumn(columnIndex) Method

Returns the client column that resides at the specified position within the column collection.

Declaration

GetColumn(
    columnIndex: number
): ASPxClientGridViewColumn

Parameters

Name Type Description
columnIndex number

A zero-based index that identifies the column within the column collection (the column’s CollectionItem.Index property value).

Returns

Type Description
ASPxClientGridViewColumn

An ASPxClientGridViewColumn object that represents the client column.

Remarks

Example

The following example illustrates how to use the GetColumn method.

function gridInit(s, e) {
    var batchApi = grid.batchEditApi;
    var visibleIndices = batchApi.GetRowVisibleIndices();

    for (var i = 0; i < visibleIndices.length; i++) {
        var visibleIndex = visibleIndices[i];
        var rateColumn = grid.GetColumn(rateColumnIndex);
        var barColumn = grid.GetColumn(barColumnIndex);
        var barRowValue = batchApi.GetCellValue(visibleIndex, barColumn);
        var rowValue = batchApi.GetCellValue(visibleIndex, rateColumn);
        SetColValue(visibleIndex, rateColumn, rowValue);
        SetBarColValue(visibleIndex, barColumn, barRowValue);
    }
}
See Also