Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hierarchal FlexGrid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00569890
Message ID:
00569926
Vues:
30
This message has been marked as the solution to the initial question of the thread.
>Has anyone been able to get the VB Hierarchal FlexGrid to work in VFP? Or does anyone know of a similar control available ifor VFP?

It's not exclusive of VB, rather it's an ActiveX control that can be used in VFP too.

Works just fine in VFP, if you are looking at it for ADO shaped recordsets it would work the same as in VB, just retrieve your recordset and then assign it to the DataSource property of the grid. This simple example shows how you would use it:
Local cnStr, cCrit, cSql
*-- create the connection with the shape provider
This.oH = CreateObject("ADODB.Recordset")
This.oCn = CreateObject("ADODB.Connection")
cnStr = "Provider=MSDataShape.1;Data Provider=SQLOLEDB.1;"
cnStr = CnStr + "Integrated Security=SSPI;Initial Catalog=myDatabase;"
cnStr = CnStr + "Data Source=myServer"
With This.oCn
   .CursorLocation = 3
   .ConnectionString = cnStr
   .Open
EndWith


cCrit = "GXV13800"

cSql = "SHAPE {Select Filename, field2 From myTable "
cSql = cSql + "Where Filename Like '" + cCrit + "%'} "
cSql = cSql + "As QReport APPEND ({Select field1, field2 From QR_Detail} "
cSql = cSql + "As QDetail Relate FileName To cSql = cSql + "FileName) As QDetail"
This.oH = This.oCn.Execute(cSql)
This.oH.ActiveConnection = Null
This.oCn.Close
This.HFGrid1.DataSource = This.oH
Where HFGrid1 is the ole control that contains the MSHFlexGrid control.HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform