This indicates to the DataGridControl to hide cells for the “myFieldName” property of the Data Object.
If you really want the property to “not be bound at all”, then the process has slightly more verbose:
<Window.Resources> <DataGridCollectionViewSource x:Key=”myCVS”> <DataGridCollectionViewSource.ItemProperties> <DataGridItemProperty Name=”myOtherField” /> <!– In this approach, you have to specify all the properties you WANT to see and OMIT the ones you don’t want to see –> </DataGridCollectionViewSource.ItemProperties> </DataGridCollectionViewSource> </Window.Resources>
Marcus, Thanks for the reply. The problem i have is that at compile time i don’t know the type of object in my model and i don’t want to define in the xaml the list of columns for every possible scenario i have. Was wondering if by annotating the class property with an attribute( i.e [IgnoreBinding]) my property won’t be bound to the grid.
Imported from legacy forums. Posted by abatti (had 3311 views)