Is this currently supported in the GridView? Or am I doing something wrong?
Troy
5 Answers, 1 is accepted
The DisplayFormatAttribute is not yet supported by RadGridView but we will try to include it in a future release. At the moment you can use the DataFormatString property of our GridViewDataColumn to format the data that is displayed.
Thank you for your feedback. Your Telerik points have been updated.
All the best,
Milan
the Telerik team
Do you have a more precise schedule for when you plan to implement this (and other DataAnnotation support as well)?
We are also using DataAnnotations on our classes and this is a very important feature for us.
To insert DataFormatString on every RadGridView where you use a DateTime field doesn't feel like a very feasible solution when you could have it specified in just one place and have the controls automatically pick this up.
Another DataAnnotation we've got problems with is [Editable(false, AllowInitialValue=true)] which in the RadGridView has the behaviour that it allows still allows you to edit the field but when you're done editing you get a validation error telling you the field is readonly. Here again if I want the column to be readonly I'll have to specify it in xaml.
Tomas
We won't be able to include support for those attributes in our next release (Q2) but we will do our best to improve our handling of such attributes with the service pack releases after Q2.
Kind regards,
Milan
the Telerik team
I was also relying on this attribute...
It´s a pitty that it´s not yet supported in Q2 SP1.
Are there any news about this feature?
For some simple ViewModels we use the same View + Grid with ItemSource={Bindinding Items} and using autoGenerateColumns=true, so i don't think I can use that workaround mentioned inside this thread..
Thanks in advance,
Sebastian Talamoni
You can download our latest internal build in order to get support for DisplayFormatAttribute and ReadOnlyAttribute. In a week or two we will release SP2 which will make support for these attributes official.
Let me know how it works on your end.
Sincerely yours,
Nedyalko Nikolov
the Telerik team