もっと詳しく
The WPF DataGrid has no built-in functionality for showing row numbers. My first approach was to register on the LoadingRow event and determine the index of the current row but this causes problems when sorting and scrolling the list.
A pretty solution which i found on this page uses a MultiBinding DataGridColumn….
<toolkit:DataGridTextColumn Header="#" IsReadOnly="True">
<toolkit:DataGridTextColumn.Binding>
<MultiBinding Converter="{StaticResource rowNumberConverter}">
<Binding />
<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type toolkit:DataGrid}}" />
</MultiBinding>
</toolkit:DataGridTextColumn.Binding>
</toolkit:DataGridTextColumn>
and a MultiValueConverter:
public class RowNumberConverter : IMultiValueConverter
{
   public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
//get the grid and the item Object item = values[0];
DataGrid grid = values[1] as DataGrid;
int index = grid.Items.IndexOf(item) + 1;
return index.ToString();
}

public object[] ConvertBack(object value, Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
{
    throw new NotImplementedException();
}
}

References
https://sites.google.com/site/wpfprojects/