A newer version of this page is available. Switch to the current version.

ASPxClientGridViewBatchEditApi.GetCellValue(visibleIndex, columnFieldNameOrId) Method

Gets the value of the specified cell.


    visibleIndex: number,
    columnFieldNameOrId: string,
    initial?: boolean
): any


Name Type Description
visibleIndex number

A zero-based integer value that specifies a visible index of a row containing the processed cell.

columnFieldNameOrId string

A string value that specifies the field name or unique identifier (the column’s WebColumnBase.Name property value) of a column containing the processed cell.

initial boolean

true, to return the initial (server) value; false, to return a value currently contained on the client side (modified value).


Type Description

An object containing the specified cell’s value.


The code sample below demonstrates how to use the GetCellValue method.

var x = MyGridClientName.batchEditApi.GetCellValue(0, "ProductName");

To get a new cell value (after the edit) in the ASPxClientGridView.BatchEditEndEditing event handler, wrap the GetCellValue method call inside the JavaScript setTimeout function call to ensure that a cell value is already changed:

function onBatchEndEditing(s, e) {
    window.setTimeout(function () {
    var index = e.visibleIndex;
    var col = GridView.GetColumnByField("C2");
    var res = GridView.batchEditApi.GetCellValue(index, "C2",false);
    }, 10);

The GetCellValue method does not return a value if the column’s GridColumnEditFormSettings.Visible property is set to false.

Online Examples

WebForms approach:

See Also