windowsforms-devexpress-dot-xtragrid-dot-views-dot-base-dot-baseview-7ffa3da9.md
Gets or sets the View name.
Namespace : DevExpress.XtraGrid.Views.Base
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[Browsable(false)]
[DefaultValue("")]
[XtraSerializableProperty]
public virtual string Name { get; set; }
<Browsable(False)>
<DefaultValue("")>
<XtraSerializableProperty>
Public Overridable Property Name As String
| Type | Default | Description |
|---|---|---|
| String | String.Empty |
A String value representing the View name.
|
At runtime, you can access View objects directly by their names. However, the View accessed will be a pattern View. Please refer to the Pattern and Clone Views topic for details on accessing View clones. Also note that the Name property of clone Views will return the name of the corresponding pattern View.
The Name property can be used at runtime to evaluate an object by its name rather than by the type or programmatic name. Since the property returns a String, it can be evaluated in case-style logic statements ( Select statement in Visual Basic, switch statement in C# and C++).
The following code snippets (auto-collected from DevExpress Examples) contain references to the Name 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-display-icons-in-data-cells/CS/Form1.cs#L87
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";
this.gridView1.OptionsView.RowAutoHeight = true;
winforms-grid-draw-thick-border-abound-focused-cell/CS/Form1.cs#L81
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";
this.gridView1.CustomDrawCell += new DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventHandler(this.gridView1_CustomDrawCell);
winforms-grid-hide-check-box-from-certain-cells/CS/CS/Form1.cs#L80
this.gridView1.GridControl = this.gridControl1;
this.gridView1.Name = "gridView1";
this.gridView1.CustomRowCellEdit += new DevExpress.XtraGrid.Views.Grid.CustomRowCellEditEventHandler(this.gridView1_CustomRowCellEdit);
winforms-grid-display-icons-in-data-cells/VB/Form1.vb#L80
gridView1.GridControl = gridControl1
gridView1.Name = "gridView1"
gridView1.OptionsView.RowAutoHeight = True
winforms-grid-draw-thick-border-abound-focused-cell/VB/Form1.vb#L81
Me.gridView1.GridControl = Me.gridControl1
Me.gridView1.Name = "gridView1"
' Me.gridView1.CustomDrawCell += New DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventHandler(Me.gridView1_CustomDrawCell)
winforms-grid-hide-check-box-from-certain-cells/VB/CS/Form1.vb#L74
gridView1.GridControl = gridControl1
gridView1.Name = "gridView1"
AddHandler gridView1.CustomRowCellEdit, New CustomRowCellEditEventHandler(AddressOf gridView1_CustomRowCellEdit)
See Also