Click to See Complete Forum and Search --> : data grid control


danyal711
December 4th, 1999, 09:29 PM
How do i use a data grid control. How can i enter things into the colums and rows. If i have a text file that is formated like this "CA","california" and then under that another statecode and state and so on for 57 different items, how can i put all these into a data grid with 2 colums????
PLEASE HELP

Heru
December 11th, 1999, 12:43 PM
First, you need to make a reference to:
Microsoft ActiveX Data Object Library 2.0 ( go to Project in your menu and select reference then scroll down and check it) and
Then you need to go to Project in menu again, this time select component, then check
Microsoft DataGrid control control 6.0

If you've done with this, you need to first create a connection to your database
when you have this connection then in your form load event you write the select statement selecting only those two columns from your database.

then in your click event, you write:

Set DataGridName . Datasource = recordset

then it should work, let me know! Heru