Skip to main content

ASPxClientGridViewBatchEditApi.HasChanges Method

Indicates whether the grid or the specified row/cell has unsaved changes in batch edit mode.

Declaration

HasChanges(
    visibleIndex?: number,
    columnFieldNameOrId?: string
): boolean

Parameters

Name Type Description
visibleIndex number

The row’s visible index.

columnFieldNameOrId string

The field name or unique identifier (the Name property value) of the column.

Returns

Type Description
boolean

true if the grid or the specified row/cell has unsaved changes; otherwise, false.

Remarks

Call the client-side HasChanges method to identify whether the grid or the specified row/cell contains unsaved changes.

<dx:ASPxGridView ID="Grid" runat="server" AutoGenerateColumns="False" ClientInstanceName="ClientGrid">
    <Columns>
        <%--...--%>
        <dx:GridViewDataTextColumn FieldName="Country" />
    </Columns>
    <SettingsEditing Mode="Batch" />
</dx:ASPxGridView>
// Indicates whether the grid contains unsaved changes
ClientGrid.batchEditApi.HasChanges();

// Indicates whether the row with the '0' visible index contains unsaved changes
ClientGrid.batchEditApi.HasChanges(0);

// Indicates whether the row with the '0' visible index contains changes in the 'Country' column
ClientGrid.batchEditApi.HasChanges(0, 'Country');

For more information on the grid in batch edit mode, refer to the following topic: ASPxGridView - Batch Edit Mode.

See Also