This is a migrated thread and some comments may be shown as answers.

Enabling Dataannotations

5 Answers 58 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gary
Top achievements
Rank 1
Gary asked on 05 Apr 2014, 02:12 AM
I have been playing around with the Telerik GridView and am very impressed with its capabilities.  However, I have tried data binding to an object containing dataanotations (specifically the Display attribute) but the grid seems to be ignoring them.  Is there something I have to do in order to make this work?  I am using .Net version 4 so I think it should be supported.  Any help would be appreciated.

5 Answers, 1 is accepted

Sort by
0
SoftwareDev
Top achievements
Rank 1
answered on 07 Apr 2014, 05:01 PM
I've found that using the DisplayName annotation works, but it appears to ignore the Display annotation.
0
George
Telerik team
answered on 09 Apr 2014, 02:59 PM
Hello,

Thank you for writing.

RadGridView does not support DataAnnotations, you can use its Formatting and Editing events. You can also modify the Rows and Columns.

If you have any specific questions, do not hesitate to ask.

Regards,
George
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Gary
Top achievements
Rank 1
answered on 11 Apr 2014, 08:34 PM
That's unfortunate.  I love using your products but we have invested a lot of time and money incorporating data annotations on our view model properties.  We even localize strings utilizing them.  Does the WPF or Silverlight version of the GridView support data annotations? 
0
Gary
Top achievements
Rank 1
answered on 11 Apr 2014, 09:14 PM
Thanks Adam.  You are absolutely correct about the DisplayName annotation working.  I made the change on a property but did not see the change in the grid until I disconnected the datasource and then reconnected it.
0
George
Telerik team
answered on 16 Apr 2014, 10:51 AM
Hello Gary,

Thank you for replying.

RadGridView for WPF does support data annotations if you use the .NET 4 build assemblies. In order to get a more concrete information about the supported/unsupported data annotations I would like to kindly ask you to submit your questions under the form of a new support ticket by selecting RadGridView for WPF as a product or forum post in the respective section.

Let me know if you require further assistance regarding RadGridView for WinForms.

Regards,
George
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
Gary
Top achievements
Rank 1
Answers by
SoftwareDev
Top achievements
Rank 1
George
Telerik team
Gary
Top achievements
Rank 1
Share this question
or