dpanattoni
IS-IT--Management
I know I can directly access the first or last record in a dataset's datatable by the following:
// Go to first record in table.
DataTable dt = ds.Tables["Orders"];
DataRow dr = dt.Rows[0];
// Go to last record in table.
DataTable dt = ds.Tables["orders"];
DataRow dr = dt.Rows[(ds.Tables["Orders"].Rows.Count) - 1];
Is there somewhere that is stored in the datatable, which row is current? I want to create nextrow() and prevrow() functions, but would find it much easier if the rowindex is already being stored.
Thanks,
DP
// Go to first record in table.
DataTable dt = ds.Tables["Orders"];
DataRow dr = dt.Rows[0];
// Go to last record in table.
DataTable dt = ds.Tables["orders"];
DataRow dr = dt.Rows[(ds.Tables["Orders"].Rows.Count) - 1];
Is there somewhere that is stored in the datatable, which row is current? I want to create nextrow() and prevrow() functions, but would find it much easier if the rowindex is already being stored.
Thanks,
DP