Hi. I have a datagrid in wpf. And I am trying to add buttons to certain cells of the grid, after it is bound to a particular itemsource. I have tried to do this in the xaml like this: `
<dg:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<awc:ImageButton Content="Edit" Name="btnEdit" Visibility="Collapsed"/>
</DataTemplate>
</dg:DataGridTemplateColumn.CellTemplate>
</dg:DataGridTemplateColumn>`
However, I want to know as to how I can do this in the code behind. I need this so that I can place buttons whenever a particular click even takes place. Any help will be highly appreciated.