Skip to main content
A newer version of this page is available. .

MultiEditorRow Class

Represents a multi-editor row.

Namespace: DevExpress.XtraVerticalGrid.Rows

Assembly: DevExpress.XtraVerticalGrid.v18.2.dll

Declaration

public class MultiEditorRow :
    EditorRow

The following members return MultiEditorRow objects:

Remarks

The MultiEditorRow class represents the multi-editor row in the VGridControlBase descendants. Rows of this type are used to display the values of several data fields, they are capable of displaying a number of cells within each record and thus the same number of corresponding header cells. The data cell values of multi-editor rows can be modified by end-users using the cell’s editors or via code.

Since a multi-editor row can display the data from several row items within each record, it will own a collection of row items. This collection can be accessed via the MultiEditorRow.PropertiesCollection property. Each object in this collection represents settings for an individual row item.

Row items in the multi-editor row are divided by separators. The MultiEditorRow class introduces properties that allow you to specify the separator’s appearance. These are the MultiEditorRow.SeparatorKind and MultiEditorRow.SeparatorString properties . The first property specifies whether the separator is a vertical line or a string. If the separator is set to be a string, its textual content is specified by the MultiEditorRow.SeparatorString property.

Example

The example below demonstrates how to create a multi-editor row at runtime using the default constructor. The new multi-editor row is intended to represent and edit the values of two data fields (MPG City and MPG Highway) which contain information about the fuel efficiency of cars. For this purpose, two row items are created, adjusted and added to the row’s MultiEditorRow.PropertiesCollection. Since both bound fields are of an identical data type, both row items will use the same editor of the SpinEdit type to display and edit their data.

In the end of the example code’s execution, the multi-editor row containing two row items is added to the grid’s VGridControlBase.Rows collection.

using DevExpress.XtraVerticalGrid.Rows;
using DevExpress.XtraEditors.Repository;

// creating a new multi-editor row instance
MultiEditorRow newMultiEditorRow = new MultiEditorRow();
// assigning the name to the created multi-editor row
newMultiEditorRow.Name = "multiEditorRow_MPG";

// creating the first row item, specifying its name and binding it to a data field  
MultiEditorRowProperties rowItem1 = newMultiEditorRow.PropertiesCollection.Add();
rowItem1.Caption = "MPG City";
rowItem1.FieldName = "MPG City";

// creating the second row item bound to a data field and specifying its name 
MultiEditorRowProperties rowItem2 = newMultiEditorRow.PropertiesCollection.Add("MPG Highway");
rowItem2.Caption = "MPG Highway";

// assigning the same editor for the created row items
RepositoryItemSpinEdit riSpin = vGridControl1.RepositoryItems.Add("SpinEdit") as 
  RepositoryItemSpinEdit;
rowItem1.RowEdit = riSpin;
rowItem2.RowEdit = riSpin;

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