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

System.ComponentModel.DisplayNameAttribute

1 Answer 78 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 17 Nov 2010, 04:53 PM
Hi,
I have a data object class with System.ComponentModel.DisplayNameAttribute attribute.
When setting grid's ItemsSource with a collection of this data object, I see that the overriden DisplayName property getter is called by the grid, even though I set the Header property of each column hard-coded, and AutoGenerateColumns on the grid is set to false.

Is there a way to disable the grid's usage of this attribute without removing it from the data object?

Thanks,
Regards,
David.

1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 19 Nov 2010, 01:27 PM
Hi David,

I tried this and the getter is not getting called by RadGridView. In case you are using WCF RIA Services, then it will be called, but not by RadGridView but from the domain services code.

Can you do the following experiment. Remove RadGridView and replace it with a normal ListBox, for example. Is the getter called again?

In case you have a working sample project that demonstrates that the getter is indeed called by RadGridView, can you please send it to us. We will examine it immediately. It is possible that we have missed something.

We are looking forward to hearing from you.

All the best,
Ross
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
GridView
Asked by
David
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or