Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the control source of a grid
Message
From
10/03/2000 04:20:49
 
 
To
09/03/2000 16:00:46
Bob Smith
Custom Data Services, Inc.
Mansfield, Massachusetts, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00343850
Message ID:
00344063
Views:
20
Hi Bob.

>> When I change the record source of the grid I am losing
the code in the header click events.
What can I do ? <<

You have a couple of options. Set up a parameterized view and use that as the recordSource for your grid. Then, when you need to change the grid's data, just set your paramter and requery the view. Alternatively, you can set up an updateable cursor in the form's load, bind your grid to that, and when you want to "refresh" its data, just do a SELECT into a temporary cursor, ZAP the grid's RecordSource, and append from the temporary cursor. Personally, I find this a lot more reliable that the old 'set the grid RecordSource to an empty string first' trick.

Marcia
Previous
Reply
Map
View

Click here to load this message in the networking platform