Back to Devexpress

OptionsColumnEditForm.Caption Property

windowsforms-devexpress-dot-xtragrid-dot-columns-dot-optionscolumneditform-ce11ee57.md

latest2.8 KB
Original Source

OptionsColumnEditForm.Caption Property

Gets or sets the caption of the editor that represents the current grid 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
[DefaultValue("")]
[XtraSerializableProperty]
public virtual string Caption { get; set; }
vb
<DefaultValue("")>
<XtraSerializableProperty>
Public Overridable Property Caption As String

Property Value

TypeDefaultDescription
StringString.Empty

The caption of the editor that represents the current grid column.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to Caption
GridColumn

.OptionsEditForm .Caption

|

Remarks

By default, an editor’s caption matches the corresponding grid column’s caption. You can override the editor’s caption within an Edit Form using the Caption property. It is possible to assign a value to this property at design time or in code:

csharp
gridView1.Columns.ColumnByFieldName("Region").OptionsEditForm.Caption = "State:";
vb
GridView1.Columns.ColumnByFieldName("Region").OptionsEditForm.Caption = "State:"

The following picture shows the result of assigning a custom caption to the editor that corresponds to the “Region” grid column:

You can also specify the caption location via the OptionsColumnEditForm.CaptionLocation property.

See Also

CaptionLocation

OptionsColumnEditForm Class

OptionsColumnEditForm Members

DevExpress.XtraGrid.Columns Namespace