Oops again. I realized I pasted the wrong code. (Sorry! - it's been a long
week, not to mention my cold...) What's going on is that, instead of
highlighting the same row that was highlighted previous to a column header
click, a different row is highlighted. This row is the xFileth row (xrow
seems to become xFile). Hope this makes sense. Any help would be great,
especially since it seems that
int xrow = dv.Find(xFile);
should give me the row number that contains xFile (right?).
Mel
"melanieab" wrote:
Hi,
I have a datatable and am searching the column called File for a particular
value called xFile (a number).
DataView dv = new DataView(tCat, "", "File", DataViewRowState.CurrentRows);
int xrow = dv.Find(xFile);
MessageBox.Show(dv[xrow]["File"].ToString());
But the messagebox just shows xrow to be the value of xFile, not the row
it's in. What am I missing?
Thanks!
Mel