← Back to all blogs

Posts tagged with 'conditional-data-template'

Conditional DataTemplates in C1DataGrid

ComponentOne’s DataGrid for WPF gives us the ability to create different types of Columns. But what if we wish to add different types of cells in a single column. We can surely achieve this functionality in C1DataGrid with the help of DataTriggers in a DataGridTemplateColumn. The different cell contents are created based on the data which is bound to it, we just need to check the data or its type and add a DataTemplate accordingly.