Data Annotation in Grid Component
18 Nov 20181 minute to read
Data Annotation helps you define rules for the model class to perform data validation and display suitable messages to end users as validation message in the edit form.
The Data Annotation can be enabled by referencing the System.ComponentModel.DataAnnotations namespace which maps data annotation to the corresponding DataGrid Column property.
NOTE
The DataGrid Property has more priority than the Data Annotation. For Instance, if the DisplayName Attribute is set to a Field in the DataGrid model class and the HeaderText is set to the same DataGrid column property, the value of the HeaderText property will be considered and shown in the DataGrid header.