How to navigate into Dataset

How to navigate into Dataset

Post by Kamal Ahme » Tue, 08 Feb 2005 21:30:05


Hi All,

I have a winform with textboxes binded to a dataset that is connected to a
database table. I want to navigate through records (Next, Prior etc). What
is best way to do this...?

TIA
 
 
 

How to navigate into Dataset

Post by Marc Scheu » Wed, 09 Feb 2005 17:25:25

>I have a winform with textboxes binded to a dataset that is connected to a

You cannot navigate a DataSet - a DataSet is an object that contains
one or mutliple DataTables, plus DataRelations and more.

You probably want to iterate over the Rows in a DataTable contained in
a DataSet - this is just an array of DataRow objects, which you access
like any other array - with an index.

myDataTable.Rows[0] gives you the first row
myDataTable.Rows[1] gives you the second row
.......
myDataTable.Rows[myDataTable.Rows.Count-1] gives you the last row

Marc
================================================================
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch

 
 
 

How to navigate into Dataset

Post by Hemang Sha » Fri, 11 Feb 2005 09:53:37

What you are looking for is a navigation system, to navigate your records in
the recordset.

You use the binding context and currencymanager to create those buttons.

This MSDN article will get you up and running:

http://www.yqcomputer.com/

HS