EditorRow Class

Specifies a single-edtior data row within the vertical grid control.

Namespace: DevExpress.XtraVerticalGrid.Rows

Assembly: DevExpress.XtraVerticalGrid.v20.1.dll

Declaration

public class EditorRow :
    BaseRow
Public Class EditorRow
    Inherits BaseRow

Remarks

The EditorRow class is an editor row — a [row] that allows users to edit cell values. An editor row consists of a header and data cells (a single cell for each record). Users can invoke an editor to set a cell value. You can also set cell values in code.

Use the EditorRow.Properties to access a RowProperties object that contains row settings (caption, image, etc.).

Examples

The example below demonstrates how to create an editor row at runtime and bind it to a specific data field using a constructor with the fieldName parameter. The new editor row is intended to represent and edit values of the HP (horse power) data field. For this purpose, an editor of the SpinEdit type is used for the row. The example code adjusts the created row and adds it to the grid's VGridControlBase.Rows collection.

During row adjustment the code sets the desired name and caption for the row and specifies an editor of the SpinEdit type for the row.

using DevExpress.XtraVerticalGrid;
using DevExpress.XtraVerticalGrid.Rows;

// creating a new editor row bound to a data field
EditorRow newEditorRow = new EditorRow("HP");

// assigning the name and caption to the created editor row
newEditorRow.Properties.Caption = "HP";
newEditorRow.Properties.FieldName = "HP";

// assigning the editor for the created editor row
newEditorRow.Properties.RowEdit = vGridControl1.RepositoryItems.Add("SpinEdit");

// appending the editor row to a collection of top level grid rows
vGridControl1.Rows.Add(newEditorRow);
See Also