Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Grid RecordSource causes class definition to be
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00080583
Message ID:
00080644
Views:
24
>Whenever I rebuild the cursor by re-running the SQL SELECT, however, the parent class settings for the grid are lost. The DblClick event no longer works and even the column widths and fonts are changed to be what looks like a regular BROWSE window.

This is the mother of all FAQs. When you re-create your cursor, the grid loses all data bindings and reverts to default behavior. To deal with this in the simplest way, use a view and simply execute a ReQuery rather than destroying/recreating your cursor. If this is not an option, then do a myForm.Removeobject to remove the grid before recreating your cursor, then recreate the cursor, then do myForm.Addobject using your grid class. I think you need to set gridObject.Visible to .T. after you add it to your form.
Previous
Reply
Map
View

Click here to load this message in the networking platform