TableView.InitNewRow Event
Enables you to initialize new rows with default values.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v14.2.dll
#Declaration
#Event Data
The InitNewRow event's handler receives an argument of the InitNewRowEventArgs type. The following properties provide information specific to this event:
Property | Description |
---|---|
Handled |
Gets or sets a value that indicates the present state of the event handling for a routed event as it travels the route.
Inherited from Routed |
Original |
Gets the original reporting source as determined by pure hit testing, before any possible Source adjustment by a parent class.
Inherited from Routed |
Routed |
Gets or sets the Routed |
Row |
Gets the handle of the added row. |
Source |
Gets or sets a reference to the object that raised the event.
Inherited from Routed |
#Remarks
When an end-user starts to edit the New Item Row, the InitNewRow event is raised. You can handle this event to initialize the required fields within the new record. For instance, you can assign a unique value to the key field and/or assign default field values. To do this, use the grid's GridControl.SetCellValue method. To learn more, see New Item Row and Obtaining and Setting Cell Values.