Skip to main content

GridColumn.ColumnAnnotationAttributes Property

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

Namespace: DevExpress.XtraGrid.Columns

Assembly: DevExpress.XtraGrid.v23.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