Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid data and cursors
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00103549
Message ID:
00104605
Views:
20
> That works, however, when I set the recordsource a second time, I lose all my property settings for the grid. Do you know why the grid control assumes you want to return to default property settings everytime you set the recordsource after init? For example, I have checkbox controls for the first four logical fields, or font settings and width of column settings. When I set the recordsource a second time while the form is running, it looks as if it is a brand new grid control loaded from a table with default properties. Do you know how to prevent this from happening?

You need to do things in the right sequence...make sure you set grid.recordsource = '' BEFORE doing any requerying on the cursor. Like:

grid.recordsource = ''
select ... into mycursor
grid.recordsource = 'mycursor'

Is this the way you're doing it?
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform