Back to Devexpress

GridColumn.OptionsEditForm Property

windowsforms-devexpress-dot-xtragrid-dot-columns-dot-gridcolumn-e65c3bfe.md

latest4.3 KB
Original Source

GridColumn.OptionsEditForm Property

Provides access to the settings of the editor that corresponds to the current column within an Edit Form.

Namespace : DevExpress.XtraGrid.Columns

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[DXCategory("Options")]
[XtraSerializableProperty(XtraSerializationVisibility.Content, XtraSerializationFlags.DefaultValue)]
public OptionsColumnEditForm OptionsEditForm { get; }
vb
<DXCategory("Options")>
<XtraSerializableProperty(XtraSerializationVisibility.Content, XtraSerializationFlags.DefaultValue)>
Public ReadOnly Property OptionsEditForm As OptionsColumnEditForm

Property Value

TypeDescription
OptionsColumnEditForm

The settings of the editor that corresponds to the current column within an Edit Form.

|

Remarks

The OptionsColumnEditForm class contains the settings of the editor that corresponds to the current column within the Edit Form. You can specify the editor’s caption, location, size, layout, and visibility.

Example

The following example demonstrates how to customize the layout of the Edit Form.

csharp
using DevExpress.Utils;
using DevExpress.XtraGrid.EditForm;
using DevExpress.XtraGrid.Views.Grid;

// Enables the Edit Form.
gridView1.OptionsBehavior.EditingMode = GridEditingMode.EditFormInplace;

// Specifies the visibility of column editors in the Edit Form.
colFirstName.OptionsEditForm.Visible = DefaultBoolean.True;
colLastName.OptionsEditForm.Visible = DefaultBoolean.True;
colNotes.OptionsEditForm.Visible = DefaultBoolean.True;
colFullName.OptionsEditForm.Visible = DefaultBoolean.False;
// Specifies the Notes editor's position among other editors.
colNotes.OptionsEditForm.VisibleIndex = 2;
// Specifies the Notes editor's 'size'.
colNotes.OptionsEditForm.ColumnSpan = 2;
colNotes.OptionsEditForm.RowSpan = 2;
colNotes.OptionsEditForm.UseEditorColRowSpan = false;
// Specifies the location of the caption.
colNotes.OptionsEditForm.CaptionLocation = EditFormColumnCaptionLocation.Near;
vb
Imports DevExpress.Utils
Imports DevExpress.XtraGrid.EditForm
Imports DevExpress.XtraGrid.Views.Grid

' Enables the Edit Form.
gridView1.OptionsBehavior.EditingMode = GridEditingMode.EditFormInplace

' Specifies the visibility of column editors in the Edit Form.
colFirstName.OptionsEditForm.Visible = DefaultBoolean.True
colLastName.OptionsEditForm.Visible = DefaultBoolean.True
colNotes.OptionsEditForm.Visible = DefaultBoolean.True
colFullName.OptionsEditForm.Visible = DefaultBoolean.False
' Specifies the Notes editor's position among other editors.
colNotes.OptionsEditForm.VisibleIndex = 2
' Specifies the Notes editor's 'size'.
colNotes.OptionsEditForm.ColumnSpan = 2
colNotes.OptionsEditForm.RowSpan = 2
colNotes.OptionsEditForm.UseEditorColRowSpan = False
' Specifies the location of the caption.
colNotes.OptionsEditForm.CaptionLocation = EditFormColumnCaptionLocation.Near

See Also

OptionsColumnEditForm

Assign(BaseOptions)

OptionsEditForm

GridColumn Class

GridColumn Members

DevExpress.XtraGrid.Columns Namespace