Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Class - Adding Header Code Dynamically
Message
 
To
05/05/2003 13:39:56
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00784946
Message ID:
00785080
Views:
37
Hi.
When i started using Grids, I was getting very confused , particularly if the control source was a Sql command (as a lot of mine are) as the gris seemed to disappear.

What I have done now for 'all' my grids is set them up as data driven grids.
In other words, I take all the data to pouplate the grid from a 'Grid' table.
At this point I have'nt got every property data driven, just the ones that are most common. I've also set up some method code hanging off these to allow for 'run time' events to be processed. e.g. on Valid, When and Click.
(I've done this using a memo field and & command as it was done in an early version of VFP6.. could now use the command to execute a block of code , whose name escapes me right now.

On the Grid table, I gave fields for all the grids , with a Key into it for each specific grid. I just need about 4 lines of code on the screen to populate the grid , as well as an empty Grid .

Hope this helps.

regards,


Gerard






>I will be very interested in your solution. Creating grids via code has been a problem for me too as you cannot modify certain properties via code when they are created dynamically (the header or click methods are examples of this). I have stuck to creating grids the gui way on the form and then when I want to change the grid's source, setting the record source to "" first and then setting it to the valid new source (idea from Sergey).
>
>I will be watching this thread to see what new ideas you are provided!
Previous
Reply
Map
View

Click here to load this message in the networking platform