wpf-403274-controls-and-libraries-data-grid-mvvm-enhancements-bind-to-collections-specified-in-the-viewmodel.md
You can define collections of grid objects (for example, columns or summaries) in a ViewModel and assign them to the GridControl.
To generate grid objects from a ViewModel collection, specify the Source and Generator properties:
SourceSpecifies a collection from which the GridControl generates objects.GeneratorSpecifies a template used to generate grid objects.
|
Grid Objects
|
Source Property
|
Generator Template
|
Example
| | --- | --- | --- | --- | |
Columns
|
|
ColumnGeneratorTemplate / ColumnGeneratorTemplateSelector
|
How to: Bind the Grid to a Collection of Columns
| |
Bands
|
|
BandGeneratorTemplate / BandGeneratorTemplateSelector
|
How to: Bind the Grid to Bands Specified in ViewModel
| |
Total and Group Summaries
|
|
|
How to: Bind the Grid to Total and Group Summaries
| | |
|
| |
Conditional Formatting Rules
|
TableView.FormatConditionsSource
|
TableView.FormatConditionGeneratorTemplate / TableView.FormatConditionGeneratorTemplateSelector
|
How to: Bind the Grid to a Collection of Conditional Formatting Rules
| | |
TreeListView.FormatConditionsSource
|
TreeListView.FormatConditionGeneratorTemplate / TreeListView.FormatConditionGeneratorTemplateSelector
| |
Selected Items
|
|
–
|
Binding to a Collection of Selected Items
|