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

ASPxGridView.IsNewRowEditing Property

Indicates whether a new row is being edited.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

public bool IsNewRowEditing { get; }

Property Value

Type Description
Boolean

true if a new row is being edited; otherwise, false.

Remarks

Example

The following example illustrates how to use the IsNewRowEditing property.

WebForms approach:

protected void grid_StartRowEditing(object sender, 
DevExpress.Web.Data.ASPxStartRowEditingEventArgs e) {
    if (!grid.IsNewRowEditing)
        grid.DoRowValidation();
}

MVC approach:

...
settings.BeforeGetCallbackResult = (sender, e) => {
    MVCxGridView gridview = sender as MVCxGridView;
    if(gridview.IsNewRowEditing)
        gridview.DataColumns["Column_Name"].EditCellStyle.BackColor = System.Drawing.Color.Green;
    else        
        gridview.DataColumns["Column_Name"].EditCellStyle.BackColor = System.Drawing.Color.Yellow;                
};
...

The following code snippets (auto-collected from DevExpress Examples) contain references to the IsNewRowEditing property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also