Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange form/grid behavior
Message
De
27/04/2000 21:31:59
Jim Crowder
Progressive Group Alliance
Boise, Idaho, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Strange form/grid behavior
Divers
Thread ID:
00364292
Message ID:
00364292
Vues:
51
I have a form with a 2 tab PageFrame. Page1 contains a couple of combo boxes where I get the Member and Supplier Name. In the LostFocus Event of the last combo box I retrieve data from a SQL Server db and then populate agrid on Page2 with the following code :

IF RECCOUNT() = 0
THISFORM.PageFrame1.Page2.Grid2.RecordSource = ""
*--- let them add their own products
THISFORM.PageFrame1.Page2.Enabled = .T.
THISFORM.PageFrame1.Page1.Command1.Enabled = .T.
MESSAGEBOX ("No items found in the Product database for the selected Supplier!")
THISFORM.PageFrame1.Page2.Text1.Value = "NO Products found for this Supplier!"
THISFORM.Refresh
ELSE
*--- enable page 2 tab
THISFORM.PageFrame1.Page2.Enabled = .T.
THISFORM.PageFrame1.Page1.Command1.Enabled = .T.
*--- required so that original design grid settings are not lost

*--- set the record source
THISFORM.PageFrame1.Page2.Grid2.RecordSourceType = 1
THISFORM.PageFrame1.Page2.Grid2.RecordSource = "myCursor"
THISFORM.PageFrame1.Page2.Text1.Value = "Products sorted by Brand. Click on column header to change."
THISFORM.Refresh
ENDIF

The problem is : If I select a Supplier the first time into this form it populates Page2.Grid2 just fine,
but if I change the Supplier Name I get a foreign grid that does not contain the same fonts and also
does not seem to contain the same code for interacting with it. Any help would certainly be appreciated.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform