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

Binding MSFlexGrid with ADO code

Status
Not open for further replies.

Imbriani

Programmer
Jan 9, 2004
195
US
This is probably a stupid question, but I haven't been able to find a simple answer. How do I bind a MSFlexGrid to a form with ADO code? I've been using DataGrids, which were bound in the following manner:

grdDataGrid.DataMember = "Secondary"
Set grdDataGrid.DataSource = PrimaryCLS


But, I've decided that the flexgrid would be better. However, when I tried to bind the flexgrid in the same manner as above, it doesn't bind. I've looked through your FAQs and books, and haven't found a simple answer. Help??

Kathy
 
I think that you will need to add an ADODC (ADO data control). Bind the recordset to the ADODC and the ADODC to the Flexgrid.

Double check on this, it has been a while since I used bound grids.

zemp
 
I bet you guys will be glad when I give up the programming career field, huh?

Can you mix classes and ADO Data controls? That's what I've been trying to find out without success. In the code, I can successfully type: MSFlexGrid.DataSource = But when I type in PrimaryCLS, which is the source, there is no binding. It appears that it is possible to bind it in the class, but that's all the information I've been able to glean, that it MIGHT be possible.

 
Do as zemp says and then use the following code to display.


Set MSHFlexGrid1.DataSource = datPrimaryRS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top