Hi,
I'm trying to re-select the currently selected row after a DataGrid sort.
When a row is selected, I get the unique string xDate that's associated with
that row. When the Column Header is clicked, I have:
row = ds.Tables[0].DefaultView.Find(xDate);
dg.CurrentRowIndex = row;
dg.Select(row);
(row is an integer and, when a non-column header is clicked, is the index of
that row. Above, I try to change row to the new location of xDate.)
When a non-column header is clicked, I get the correct row number, but then
when the header is clicked, row always changes to -1. What am I doing wrong?
Thanks again so much!
Mel