Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridColumn.ColumnAnnotationAttributes Property

Returns the object that contains current values for all existing Data Annotation Attributes.

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v24.2.dll

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

#Declaration

[Browsable(false)]
public virtual AnnotationAttributes ColumnAnnotationAttributes { get; }

#Property Value

Type Description
DevExpress.Data.Utils.AnnotationAttributes

An DevExpress.Data.Utils.AnnotationAttributes object that contains current values for all existing Data Annotation Attributes.

#Remarks

Data, displayed in a GridColumn, can be declared using annotation attributes. This feature allows you to create data-aware grid views where columns are automatically adjusted depending on data attributes. The ColumnAnnotationAttributes property provides access to all available attributes so you are able to check their current values.

For instance, you can read the ColumnAnnotationAttributes.AutoGenerateField property to get whether this column was created automatically (the [Display(AutoGenerateField = true/false)] attribute) or the ColumnAnnotationAttributes.IsReadOnly property to get whether end-users are allowed to edit this column’s data (the [ReadOnly(true/false)] attribute).

See the Data Annotation Attributes topic to learn more.

See Also