You don't need to use Storage Mode (XArrays) to populate the grid from a recordset!
1. Start a form.
2. Put a grid on it.
3. Put a data control on it.
4. Set the Datasource property of the grid to the data control.
5. In code; (in the Form Load event)
Data1.Databasename="BIBLIO.MDB"
Data1.Recordsource="SELECT * FROM Authors"
Data1.Refresh
Run the program and grid is populated with the contents of the authors table.
If you want to specify the columns you want to display on the grid you can edit the grid at design time by right clicking on the grid and choosing EDIT. You can then add, delete and insert columns as you see fit. You then access the properties window of the grid, go to the Columns Tab and enter the appropriate DataField name for each column.
If you are using RDO, ADO etc it works in a similar way. Note that if you use ADO you need to use the OLEDB version of the grid.
If you still have problems send me an e-mail. [email protected]




Reply With Quote