Skip to main content

InitNewRowEventArgs Class

Provides data for the GridControl.InitNewRow event.

Namespace: DevExpress.Mobile.DataGrid

Assembly: DevExpress.Mobile.Grid.v18.2.dll

Declaration

public class InitNewRowEventArgs :
    EventArgs

Remarks

Important

This documentation topic describes legacy technology. We no longer develop new functionality for the GridControl and suggest that you use the new DataGridView control instead.

The GridControl.InitNewRow event is raised when an end-user taps New Item Row in the grid. You can handle this event to initialize newly added rows. To initialize row cells, call the IEditableRowData.SetFieldValue of the IEditableRowData object returned by the event’s InitNewRowEventArgs.EditableRowData parameter.

Example

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

using DevExpress.Mobile.DataGrid;

// ...

void OnInitNewRow(object sender, InitNewRowEventArgs e) {
    e.EditableRowData.SetFieldValue ("Date", DateTime.Today);
}

Inheritance

Object
EventArgs
InitNewRowEventArgs
See Also