Skip to main content

ASPxClientGridViewBatchEditApi.ValidateRows Method

Validates data rows when the grid is in batch edit mode.

Declaration

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

Parameters

Name Type Description
validateOnlyModified boolean

true to validate only modified rows; false or undefined to validate all rows on the current page.

validateOnCurrentPageOnly boolean

true to validate rows on the current page; false or undefined to validate modified rows on all grid pages.

Returns

Type Description
boolean

true if data is valid; otherwise, false.

Remarks

The ValidateRows method allows you to validate data rows on the client side when the grid’s Mode property is set to Batch.

<dx:ASPxGridView ID="Grid" ClientInstanceName="ClientGrid" runat="server" ...>
    <!-- ... -->
    <SettingsEditing Mode="Batch" />
</dx:ASPxGridView>
var batchApi = ClientGrid.batchEditApi;

// Validates only modified rows on the current page
batchApi.ValidateRows(true, true);

// Validates modified rows on all grid pages
batchApi.ValidateRows(true);
// Or
batchApi.ValidateRows(true, false);

// Validates all rows on the current page
batchApi.ValidateRows(false, true);

// Validates all rows on the current page and modified rows on all grid pages
batchApi.ValidateRows();
// Or
batchApi.ValidateRows(false, false)

To validate a particular row, call the ValidateRow(visibleIndex) or ValidateRowByKey(key) method.

See Also