Hello all i am using datagrid and it doesnot have auto numbering. so i used the following method to number in rowheader but the problem is the numbers are repeating and when they sort a column they are rearranging themselves..Also when i scroll the page, when the row goes out of visibility and when u scroll back again its number is changing..for example on page load you see 1 to 30 in order when u scroll up and down twice, the order can become 1,30,25,4,...etc..theres no specific order..it displays random number in row header.. please suggest a way out for me
In XAML page i called the method in the following way LoadingRow="dg_expSummary_LoadingRow"
In the backend the code is as follows
private void dg_expSummary_LoadingRow(object sender, DataGridRowEventArgs e)
{
e.Row.Header = e.Row.GetIndex() + 1;
}