Without any other information in your table or a supporting structure,
you will need to do it the hard way -- loop through.

However, you can do one of two things:

1) Include a column that holds a sequential  you build your table. 
Then you can use the find method, get the sequential ID value and then
do a find again on the sequential ID column for sequential ID + 1.

Or

2) you could load the keys for the rows into an ArrayList, get the
index of the key to the first row in the ArrayList using IndexOf. The
value in the next item in the ArrayList is the key of the row you want
and you would use that in the Rows.Find to retrieve the record.


On 5/22/05, Mat�as Ni�o ListMail <[EMAIL PROTECTED]> wrote:
> Hey y'all,
> 
> I'm having trouble determining what method to use to find the row AFTER a 
> certain row in a datatable.
> 
> All I have is they key value and I want to use dt.rows.Find(key), but the 
> value I need is located in the next sequencial row.
> 
> Should I just walk the table for the key and get the dt.rows(i+1) when the 
> key is found? I just figured rows.find(key) would be faster.
> 
> BACKGROUND:
> My web page displays a table of rows of performances of a single song. For 
> each of those rows, I want to look up what song was played after it in a 
> larger table of all song performaces.
> 
> Thanks for any input,
> Matias
> Manassas, VA
> 
> 
> [Non-text portions of this message have been removed]
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 


-- 
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to