Skip to main content

ASPxClientGridView.GetColumn(columnIndex) Method

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

#Declaration

TypeScript
GetColumn(
    columnIndex: number
): ASPxClientGridViewColumn

#Parameters

Name Type Description
columnIndex number

The index of 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