TcxGridTableView.NewItemRow Property
Provides access to new item row settings.
Declaration
property NewItemRow: TcxGridNewItemRowOptions read; write;
Property Value
Type | Description |
---|---|
TcxGridNewItemRowOptions | Stores new item row settings. |
Remarks
Use this property to customize the following new item row options:
The width and color of the separator that divides the new item row from data rows (SeparatorWidth and SeparatorColor).
The “new item row” is initially empty and is used for inserting new data into a dataset. The record corresponding to the “new item row” can be accessed via the View’s ViewData.NewItemRecord property. By default, the text (‘Click here to add a new row’) is displayed in the background of a new item row. This text can be changed via the InfoText property.
If a new item row is not displayed within a View, then a user can still add records to a View. This can be done in two ways: by pressing the down arrow key when focused on the bottom row of the grid or by pressing the Insert key while any row is focused. Pressing the Insert key inserts a new record before the one currently focused; pressing the down arrow key adds a new record to the end of the underlying data set.
Ensure that the View.OptionsData.Appending and View.OptionsData.Inserting options are active before inserting records as described above.