How to add a delete column in datagrid in WPF, when i add this column, got Items collection must be empty before using ItemsSource Error
<DataGrid AutoGenerateColumns="True" ItemsSource="{Binding}" Name="dgStatus"
HorizontalAlignment="Left" Margin="10,23,0,0" VerticalAlignment="Top"
RenderTransformOrigin="-23.633,-5.198" Height="364" Width="811"
CellEditEnding="myGrid_CellEditEnding" >
<DataGridTemplateColumn>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Button Content="Delete" x:Name="btnDelete" Click="btnDelete_Click"></Button>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid>