If I set an object's property to Browsable(false) it does not show it in the grid which is great. But the user can still show it by going to the field chooser and showing it. Is there a way to stop this?
Thanks,Doug Rees
Polo Ralph Lauren.
HI,
I am attaching a sample project that will show you how to prevent a field from showing up in the FieldChooser. In the sample I set the Fields's Setting's. AllowHiding property to Never.
Please review my sample.
Sincerely,
Matt DSE
Hi Matt,
Yes but this defeats the purpose of using the autogenerate columns option of the grid. It should relying solely on object property attributes to control if a column is displayed or not. Surely if the property is marked as Browsable(false) it should NOT show up anywhere including the field chooser...
So although what you have said is true, it isnt an ideal solution and I feel the grid should utliize the property attirbutes more carefully.
Regards
Doug
Hi Doug,
Well, there might be reasons that you may want to show the Field and you will not be able to.
The XamDataGrid is honoring the attribute on the initial load. The FieldChooser gives you the opportunity to override that setting.
There is a simple solution, setting the AllowHiding Property to Never. This provides you the maximum flexibility.
Sincerely, Matt DSE
HI ,
I am just following up on this thread.
Please let me know if I need further assistance regarding this case.
Sincerley,