How to get the row number from a detail view [modified]
-
Hi, I'm trying to obtain the row number yet I haven't been able to figure out how. I have tried this:
x = reunionBindingSource.Position;
However, since I have already done this:
this.reunionBindingSource.Sort = "LastName";
the position does not equal the row number. I know I can save the position number, unsort it, grab the row number from position, resort it, and set the position. I could also build a dictionary before sorting it using the database key as the dictionary key, but there has to be a better way. Thank you,
Glenn
modified on Thursday, May 13, 2010 1:01 PM
-
Hi, I'm trying to obtain the row number yet I haven't been able to figure out how. I have tried this:
x = reunionBindingSource.Position;
However, since I have already done this:
this.reunionBindingSource.Sort = "LastName";
the position does not equal the row number. I know I can save the position number, unsort it, grab the row number from position, resort it, and set the position. I could also build a dictionary before sorting it using the database key as the dictionary key, but there has to be a better way. Thank you,
Glenn
modified on Thursday, May 13, 2010 1:01 PM