Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids built from cursors
Message
From
16/06/2001 19:45:56
 
 
To
16/06/2001 18:36:25
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00520315
Message ID:
00520322
Views:
14
This message has been marked as the solution to the initial question of the thread.
>Hi all,
>
>I MUST be missing something very simple and obvious, but I just don't know what it is. I am just trying to put a grid on a form with a cursor table as the source. I would love to be able to use the gridbuilder, but he does not seem to recognize cursors as a source for the grid. I managed to get things partially built by temporarily defining and saving a table and then using that as the recordsource. Later, I went in and changed all sources/types. But then only way I can get my records to show up is if I specify PROMPT as RECORDSOURCETYPE.
>
>There has to be something that I have overlooked. Any help would be greatly appreciated.
>
>Thanks in advance.
>
>Fred


Hi Fred,

You can easily use cursors as recordsource, either at design time or runtime, by specifying the grid.recordsource='csrMyCursor'. You can design the grid the same way you want it to look at runtime, no.of columns, fontsize, color, method code, etc., and leave the RecordSource blank. Then at runtime, create your source cursor and set the grid.recordsource = "csrMyCursor".

Remember that if you have to recreate your cursor during runtime, you need to set the grid.recordsource="" before you do, then set it back to the cursor, otherwise you'll loose the link, formatting and any code assigned to the grid, columns, etc.

Have a good weekend,

- Brian


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform