Skip to main content
Tab

ASPxGridView.IsNewRowEditing Property

Indicates whether a new row is being edited.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.1.dll

NuGet Package: DevExpress.Web

Declaration

public bool IsNewRowEditing { get; }

Property Value

Type Description
Boolean

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

Remarks

The following example illustrates how to use the IsNewRowEditing property.

Web Forms 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;                
};
...

View Example: How to use the Rich Text Editor to edit formatted text in the Edit Form

See Also