Back to Devexpress

RowProperties.Caption Property

windowsforms-devexpress-dot-xtraverticalgrid-dot-rows-dot-rowproperties-4b31f96c.md

latest5.5 KB
Original Source

RowProperties.Caption Property

Gets or sets the row caption.

Namespace : DevExpress.XtraVerticalGrid.Rows

Assembly : DevExpress.XtraVerticalGrid.v25.2.dll

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

Declaration

csharp
[DefaultValue("")]
[XtraSerializableProperty]
public string Caption { get; set; }
vb
<DefaultValue("")>
<XtraSerializableProperty>
Public Property Caption As String

Property Value

TypeDefaultDescription
StringString.Empty

A string value that specifies the row caption.

|

Remarks

Use the Caption property to specify the row caption, which is displayed in the row header.

You can also use the Caption argument to set a custom caption in a CustomDrawRowHeaderCell event handler.

The CustomizationCaption property specifies the row caption when it is displayed in the customization form.

You can use the DisplayAttribute to specify a caption for a data field. See the following topic for more information: Data Annotation Attributes.

If neither of these means is used to specify the row caption, the control uses the FieldName property value. If the field name is in the pascal case, the control separates the words with spaces.

If the ShowCaption option is disabled, the caption is not displayed.

The find panel searches for a row by its caption, tooltip, field name, and caption in the customization form. The SearchTags property allows you to specify custom tags by which the find panel can locate this row.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Caption property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-property-grid-create-rows/CS/AddRowsRuntime/Form1.cs#L27

csharp
EditorRow rowLastName = new EditorRow("LastName");
rowLastName.Properties.Caption = "Last name";
propertyGridControl1.Rows.Add(rowLastName);

winforms-property-grid-create-rows/VB/AddRowsRuntime/Form1.vb#L27

vb
Dim rowLastName As EditorRow = New EditorRow("LastName")
rowLastName.Properties.Caption = "Last name"
propertyGridControl1.Rows.Add(rowLastName)

See Also

CustomizationCaption

Name

ShowCaption

CustomDrawRowHeaderCell

Caption

Row Header

Row Header Panel

RowProperties Class

RowProperties Members

DevExpress.XtraVerticalGrid.Rows Namespace