GridColumn.Name Property
Gets or sets the column name.
Namespace: DevExpress.XtraGrid.Columns
Assembly: DevExpress.XtraGrid.v19.1.dll
Declaration
[Browsable(false)]
[DefaultValue("")]
[XtraSerializableProperty]
[XtraSerializablePropertyId(-1)]
public virtual string Name { get; set; }
Property Value
Type | Default | Description |
---|---|---|
String | String.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. Note that changing the Name property at runtime has no effect.
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, as in this instance, column names are not initialized automatically and they must be set manually.
Related GitHub Examples
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.