Delete Row one by one of GridView

This blog describes how to delete a rows one by one of gridview using command.

<Window x:Class="HorseRace.Forms.DeleteRow"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
       
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
       
Title="DeleteRow" Height="300" Width="786" Loaded="Window_Loaded">
  <
Grid>
    <
DataGrid AutoGenerateColumns="False" Height="160" HorizontalAlignment="Left" Margin="20,47,0,0" Name="dataGrid1"
VerticalAlignment="Top" Width="238"

      <DataGrid.Columns>
        <
DataGridTextColumn Header="Sports" Binding="{Binding Name}"/>
        <
DataGridTextColumn Header="Sports ID" Binding="{Binding ID}"/>
        <
DataGridTextColumn Header="Acitve" Binding="{Binding Active}"/>
        <
DataGridTemplateColumn Header="Action">
          <
DataGridTemplateColumn.CellTemplate>
            <
DataTemplate >
              <
Button Name="btnDelete" Content="Delete" Command="Delete" ></Button>
            </
DataTemplate>
          </
DataGridTemplateColumn.CellTemplate>
        </
DataGridTemplateColumn>
      </
DataGrid.Columns>
    </
DataGrid>
  </
Grid>
</
Window>