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:
00104575
Views:
32
>>I'm having cosiderable difficulty loading a grid from a cursor. I need temporary data in a grid, on a form, with no data environment.
>
>Not much to it, actually, they're very easy to use. Here are some basics: Set grid.recordsource = '' in the grid init. Then when your cursor is ready, populate the grid by setting grid.recordsource = 'mycursor'. If your cursor is designed in sync with your grid columns (field1 goes to column1, field2 goes to column2, etc) you generally don't need to set any controlsources at all for columns or column controls.
>
>If you need to recreate the cursor, each time you do, go through the process of setting grid.recordsource = '', recreate cursor, then set grid.recordsource = 'mycursor'...

Thanx,

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?

Eric K.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform