Hi all - another newbie question:
I'm trying to have a grid populated by a sql statement.
I am wondering if the proper strategy is to create the grid in the form designer by dropping the original table from the DE into the form, and then tweek the fields, record source etc, or do the whole thing in code
Thanks,
Aleniko

Populating a grid - strategy.
Rachel J
I am looking to have the grid provide a drop down box to show all the countries when it goes to edit mode.
You can download the white papaer and sample code from the session I gave on "How to put a combo box in a grid" from http://www.tightlinecomputers.com/Downloads.htm. It will give you everything you need to do this.
MFaucett
In the load of the form I set the control source for the grid.
Others may have better ways, but this is the way I like to create them.
Krushi
If at runtime that grid would be used by that table in DE then dropping the table in DE, selecting fields (or whole table), drag&drop onto form to create the grid is the simpliest way. You can also add your own subclassed grid as a grid to use when such a dragdrop from DE occurs (see field mappings under tools\options).
Bengt Gunne
Great response CetinBasoz. Could you elaborate on how to do the click and drag when you are using lookup tables via a foriegn key For example:
TABLE: MASTER
Field: MasterID Type: identity
Field: CountryID Type: Int
TABLE: luCountries
Field: CountryID Type: identity
Field: Name Type: nvarchar(50)
I am looking to have the grid provide a drop down box to show all the countries when it goes to edit mode.
Thanks in advanced.