Skip to content

Conversation

@AneesFathimaS
Copy link
Contributor

@AneesFathimaS AneesFathimaS commented Oct 15, 2025

Prepared the UG for SfDataGrid data annotation support.

Feature description
Provided Data annotation attribute support for DataGrid auto generate columns.

Tasks:
https://dev.azure.com/EssentialStudio/Mobile%20and%20Desktop/_workitems/edit/968708
https://dev.azure.com/EssentialStudio/Mobile%20and%20Desktop/_workitems/edit/968709
https://dev.azure.com/EssentialStudio/Mobile%20and%20Desktop/_workitems/edit/968710
https://dev.azure.com/EssentialStudio/Mobile%20and%20Desktop/_workitems/edit/981111
UG documentation 968712

Purpose/benefits of the feature
The Data Annotation feature will be integrated within the existing column auto-generation mechanism of the SfDataGrid. The implementation will involve enhancing the row generator component to process Data Annotation attributes during column creation without disrupting the existing functionality.

Use cases:

image

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: dataannotation

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: dataannotation
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: dataannotation

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: dataannotation
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

{% tabs %}
{% highlight c# %}
[Editable(true)]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why space left between property and property name


#### Format datagrid columns using DisplayFormat attribute

The auto-generated columns will be formatted using the [DataFormatString](https://learn.microsoft.com/en-us/previous-versions/windows/silverlight/dotnet-windows-silverlight/cc679306%28v%3dvs.95%29) property in the [DisplayFormat](https://learn.microsoft.com/en-us/previous-versions/windows/silverlight/dotnet-windows-silverlight/cc679253%28v%3dvs.95%29) attribute when the `DisplayFormat` attribute is defined for the properties defined in the model. If the `DisplayFormat` attribute is defined with the `DataFormatString` property, the DataGrid formats the column only based on `DataFormatString`, without considering other formatting property settings of columns.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the DisplayFormat attribute is defined for properties in the model, the auto-generated columns in the DataGrid created via DataAnnotations will be formatted using the DataFormatString specified in that attribute.

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: dataannotation

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: dataannotation
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants