Skip to main content

OptionsColumnEditForm.ColumnSpan Property

Gets or sets the number of layout columns the editor spans within an Edit Form. Set the OptionsColumnEditForm.UseEditorColRowSpan property to false for the ColumnSpan property to be in effect.

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v24.1.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

[DefaultValue(1)]
[XtraSerializableProperty]
public virtual int ColumnSpan { get; set; }

Property Value

Type Default Description
Int32 1

The number of layout columns within an Edit Form the editor spans.

Property Paths

You can access this nested property as listed below:

Object Type Path to ColumnSpan
GridColumn
.OptionsEditForm .ColumnSpan

Remarks

Each editor within an Edit Form spans one or more layout columns. If the OptionsColumnEditForm.UseEditorColRowSpan property is set to true, each editor spans a default number of layout columns and rows and these values depend on the editor type. Except for the MemoEdit and the PictureEdit controls, all editors span one layout column and one layout row. By default, the MemoEdit spans three rows and all layout columns (this number is specified by the GridOptionsEditForm.EditFormColumnCount property). The PictureEdit spans two layout columns and three rows by default.

You can specify a custom number of layout columns an editor spans within an Edit Form via the ColumnSpan property of the corresponding grid column. The OptionsColumnEditForm.RowSpan property allows you to specify a custom number of layout rows an editor spans.

Note

Ensure that the OptionsColumnEditForm.UseEditorColRowSpan property is set to false, for the ColumnSpan and OptionsColumnEditForm.RowSpan properties to be in effect.

gridView1.OptionsBehavior.EditingMode = DevExpress.XtraGrid.Views.Grid.GridEditingMode.EditForm;
colProductID.OptionsEditForm.UseEditorColRowSpan = false;
colProductID.OptionsEditForm.ColumnSpan = 2;

In the following picture, the “Product” editor spans two layout columns within an Edit Form whereas other editors span one layout column.

OptionsColumnEditForm_ColumnSpan

See Also