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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to read value from a certain cell in datagrid

Status
Not open for further replies.

xinyin

Programmer
Jan 16, 2003
81
HK
Hi, I have some questions on datagrid.
Q1) In datagrid they have .columns(n) for you to refer to a certain column. For example, [some grid].columns(0) let's you refer to the 1st column. But I don't know how to get values from a certain cell. I have tried this:

Dim CellThings as string
CellThings = DGrid.Columns.Item([some number]).Value
But it is not working correctly.

I also tried
CellThings = DGrid.Columns.Item([some number]).CellText
And results in error.

Q2) How do you refer to a row in datagrid?
DGrid.Rows(0) doesn't seem right.
 
It is perfectly clear on the manual (F1 key).

Have you read it?

object.Col 1

object.Row 1
object.text
Will access text on row 1, col 1 (0 based)




Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top