Back to Devexpress

BaseView.ViewCaption Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-bad4d51f.md

latest4.3 KB
Original Source

BaseView.ViewCaption Property

Gets or sets the View Caption.

Namespace : DevExpress.XtraGrid.Views.Base

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

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

Property Value

TypeDefaultDescription
StringString.Empty

A string value specifying the View’s caption.

|

Remarks

View Captions are displayed in the following cases:

If the ViewCaption property value is an empty string, the View’s corresponding relationship name (BaseView.LevelName) is used. If a View is the main View (see GridControl.MainView) and the ViewCaption property is not set, the ‘ MainView ‘ string is used as the View caption.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ViewCaption 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-grid-visualize-master-detail-data/VB/Form1.vb#L40

vb
'Specify text to be displayed within detail tabs.
cardView1.ViewCaption = "Category Products"
'Hide the CategoryID column for the master View

See Also

LevelName

ShowViewCaption

ViewCaptionHeight

Views

BaseView Class

BaseView Members

DevExpress.XtraGrid.Views.Base Namespace