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

ASPxClientGridViewBatchEditApi.GetRowVisibleIndices(includeDeleted) Method

Returns an array of row visible indices.

Declaration

GetRowVisibleIndices(
    includeDeleted: boolean
): number[]

Parameters

Name Type Description
includeDeleted boolean

true, to include visible indices of deleted rows to the returned array; otherwise, false.

Returns

Type Description
number[]

An array of integer values that are the visible indices of grid rows.

Remarks

In the batch edit mode, the ASPxGridView control allows modifying a batch of grid data on the client side and sending it to the server in one request.

Use the GetRowVisibleIndices method to get visible indices of rows that are currently presented on the client side.

Example

The following example illustrates how to use the GetRowVisibleIndices 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