Back to Devexpress

GridColumn.Name Property

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

latest2.5 KB
Original Source

GridColumn.Name Property

Gets or sets the column name.

Namespace : DevExpress.XtraGrid.Columns

Assembly : DevExpress.XtraGrid.v25.2.dll

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

Declaration

csharp
[Browsable(false)]
[DefaultValue("")]
[XtraSerializableProperty]
[XtraSerializablePropertyId(-1)]
public virtual string Name { get; set; }
vb
<Browsable(False)>
<DefaultValue("")>
<XtraSerializableProperty>
<XtraSerializablePropertyId(-1)>
Public Overridable Property Name As String

Property Value

TypeDefaultDescription
StringString.Empty

A String value specifying the column name.

|

Remarks

GridColumn objects are Component descendants, so they can be directly accessed in code using their names. Therefore, the Name property specifies the string that can be used in code to access the column.

You can also use the Name property to identify a column when handling column related events, etc. Refer to the Columns help topic for more information on identifying columns.

Note

When saving/restoring a View’s layout, ensure that column names are set to unique values. Take particular note of that if columns are created in code, column names are not initialized automatically and they must be set manually.

See Also

GridColumn.AbsoluteIndex

Columns

GridColumn Class

GridColumn Members

DevExpress.XtraGrid.Columns Namespace