Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page frame and free tables
Message
 
To
30/10/2002 11:11:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00716909
Message ID:
00717214
Views:
12
Working with grids is a lot of fun! I would always be annoyed when dynamically data sourcing from DBF's. For one thing, the custom header captions were lost (even though the structures were the same), and my grid headers would end up with field names instead!

My work around for this, was to create a cursor in the forms load event (you may need two) that matched the field structures of the DBF(s) that would eventually populate the grids. Then, when I laid out the grid, I assigned the cursor created in the forms load event, as the grid's data source.

We then have a grid with an empty cursor that we can append DBFs to (even ones with different names), and our grid controls maintain their initial setting. The headers won't change, the decimals won't change. We can zap and re-append to the grid's record source (the cursor created in the form's load event)!

You could also select into a cursor, and feed your grid data from a cursor instead of a DBF (disk clock and maintenance - erase, etc)

You're also using the same table twice. You may want to consider a USE AGAIN syntax should you stay with a DBF record source. This would allow you to maintain different pointers on each page. USE AGAIN, however, would not be necessary if you created two cursors (same structure, but a different name); one for grid1 - the second cursor for grid 2.

HTH

>Hi. I don't know why I can't get this:
>1. Using PageFrame, VFP7 and free tables
>2. Button on p1 (of pgframe) runs a SQL select (into dbf)
>3. Grid on page 2 uses that table as a record source
>4. Table is empty...why?
>
>Thanks, Randy
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform