I'm using the RadGridView with a dynamic object binding in order to show a grid of business objects (rows), each with properties (columns). The properties are not known before the business objects are selected.
Each property has its own viewmodel and related DataTemplate.
The GridCellPropertyContainerViewModel we are using for each grid cell encapsulates the relevant PropertyContent, so its DataTemplate uses a ContentControl, like so:
<
DataTemplate
DataType
=
"{x:Type local:GridCellPropertyContainerViewModel}"
>
<
ContentControl
Content
=
"{Binding PropertyContent, ValidatesOnExceptions=True, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}"
/>
</
DataTemplate
>