referencing winforms datagrid cells

Matt_h

Member
Joined
Apr 12, 2007
Messages
17
Programming Experience
Beginner
I am having problems with datagrid controls and it doesn't help that I am a complete novice with .net!

I have a windows form with some datagrids, named dg1 to dg10. The datagrids present the data from an Access reference database and allow the user to update the cells of the datagrid easily enough. What I am wanting to know is :

* How to refer to each datagrid indiviually and also refer to the cells of the datagrid individually? e.g. dgx.item(i,j)

This seems so simple but I can't get my head around it!:eek:

regards,

Matt

P.S. dg1 to 5 are on a tabbed form 1 the rest are on tabbed form 2
 
Thanx for the reply, not sure it does what I am wanting or that I am not following it though.

What I am wanting to know is how to go to each datagrid, in turn starting at 1, read all the cells into a variable and write that line out to a text file.

regards,

Matt
 
Right, I seem to have got this sorted now...

One more question on Datagrids though:

If I have a database file -

Speed mpg Gear
10 5 1
10 6 2
10 7 3
10 8 4
10 9 5
20 2 1
20 10 2
20 11 3
20 12 4
20 13 5
30 1 1
... ... ...
50 42 5

Is it possible to display this as shown below in a datagrid or not -
1 2 3 4 5
10 5 6 7 8 9
20 2 10 11 12 13
...

regards,

Matt
 
Last edited:
Back
Top