Can a DataGrid
dynamically mask the columns to be displayed?
Current Setup
DataGrid
<--Binding--> Collection<Customer>
- The type
Customer
has about 100 different fields defined. - Different views need to display different sets of columns (about 20 out of 100), chosen somehow dynamically, of the same
Collection<Customer>
.
Is there an option to dynamically mask the fields that will be displayed as columns in the DataGrid
? Ideally, I want to use Infragistics' xamDataGrid
, but any solution for a DataGrid
will be a good starting point.
There are other similar questions out there, but they deal with either column filtering or variable number of rows.