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

Optional Parameters

Name Type Default Description
validateOnlyModified boolean null

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

validateOnCurrentPageOnly boolean null

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