Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to select next row in a datagrid?

Status
Not open for further replies.

caro8pare

Programmer
Jul 28, 2004
56
HK
I use "DataGrid1.FirstRow" to determine the first row.

What can I use to to move in the next row and at the last row of the DataGrid?

And, second question, how can i determine what is the content of the field of the Row we are one?

Thanks in advance. ;o)
 
I maniplate the ADODC or source of the data for the grid.
eG. ADODC1.Recordset.MoveNext (MoveFirst, MoveLast etc)
As you type in code the period after Recordset, you get a list of the options possible.
To find contents of current row selected
ContentsOfField = ADOCC.Recordset.Fields(0) or by name
ContentsOfField = ADOCC.Recordset.Fields("MyFieldName1")

You can also get data out of the grid. Type
DataGrid. and you get a list of the possible properties
Or if all else fails, consult the HELP disk examples!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top