Skip to main content

ASPxClientGridViewBatchEditApi.HasChangesByKey(key) Method

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

#Declaration

TypeScript
HasChangesByKey(
    key: any,
    columnFieldNameOrId?: string
): boolean

#Parameters

Name Type Description
key any

The row’s key value.

columnFieldNameOrId string

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

#Returns

Type Description
boolean

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

#Remarks

Call the client-side HasChangesByKey method to identify whether the specified row or 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 row with the 'ANATR' key value contains unsaved changes
ClientGrid.batchEditApi.HasChangesByKey('ANATR');

// Indicates whether the row with the 'ANATR' key value contains unsaved changes in the 'Country' column
ClientGrid.batchEditApi.HasChangesByKey('ANATR', 'Country');

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

See Also