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
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
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
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
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
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.