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

InitNewRowEventArgs Class

Provides data for the ColumnView.InitNewRow event.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v18.2.dll

Declaration

public class InitNewRowEventArgs :
    EventArgs

Remarks

The ColumnView.InitNewRow event is raised when a new row is added to a View. The InitNewRowEventArgs class provides the InitNewRowEventArgs.RowHandle property that identifies the handle of the added row.

InitNewRowEventArgs objects with proper settings are automatically created and passed to ColumnView.InitNewRow event handlers.

Example

The following code shows how to initialize the “PurchaseDate” field of a new row via the ColumnView.InitNewRow event.

using DevExpress.XtraGrid.Views.Grid;

private void gridView1_InitNewRow(object sender, InitNewRowEventArgs e) {
   GridView view = sender as GridView;
   view.SetRowCellValue(e.RowHandle, view.Columns["PurchaseDate"], DateTime.Today);
}

Inheritance

Object
EventArgs
InitNewRowEventArgs
See Also