As Anwaka said, you can use DataGridTemplateColumn. In C # you can add create DataGridTemplateColumnlike this, here I added CheckBoxin DataGridTemplateColumn.
DataGridTemplateColumn col1 = new DataGridTemplateColumn();
col1.Header = "MyHeader";
FrameworkElementFactory factory1 = new FrameworkElementFactory(typeof(Image));
Binding b1 = new Binding("Picture");
b1.Mode = BindingMode.TwoWay;
factory1.SetValue(Image.SourceProperty, b1);
DataTemplate cellTemplate1 = new DataTemplate();
cellTemplate1.VisualTree = factory1;
col1.CellTemplate = cellTemplate1;
datagrid.Columns.Add(col1);
Here, Picture is a type property ImageSourcein the class to which the collection is assigned ItemsSource DataGrid.
source
share