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

ASPxClientGridViewBatchEditApi.ValidateRows Method

Validate grid data contained in all rows when the grid operates in Batch Edit mode.

Declaration

ValidateRows(
    validateOnlyModified?: boolean,
    validateOnCurrentPageOnly?: boolean
): boolean

Parameters

Name Type Description
validateOnlyModified boolean

true, if only modified rows should be validated; otherwise, false.

validateOnCurrentPageOnly boolean

true, to validate rows that are located only on the current page; otherwise, false.

Returns

Type Description
boolean

true, if data in all rows passes validation; otherwise, false.

Remarks

This method allows you to programmatically perform client-side validation of data contained in all rows.

Note that you can use the ASPxClientGridViewBatchEditApi.ValidateRow method to validate the specified row.

function OnClick() {
    if (Grid.batchEditApi.HasChanges()) {
        if (!Grid.batchEditApi.ValidateRows()) {
            alert('Custom error message');
        } else {
            Grid.UpdateEdit();
        }
    }
}
See Also