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.v17.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);
}

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

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.

Inheritance

Object
EventArgs
InitNewRowEventArgs
See Also