Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange form/grid behavior
Message
From
27/04/2000 21:31:59
Jim Crowder
Progressive Group Alliance
Boise, Idaho, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Strange form/grid behavior
Miscellaneous
Thread ID:
00364292
Message ID:
00364292
Views:
50
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.
Next
Reply
Map
View

Click here to load this message in the networking platform