Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GRID PROBLEM
Message
From
20/07/2000 17:16:45
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
 
To
20/07/2000 17:08:53
Steven Edge
Soft Solutions Limited
Lagos, Nigeria
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00395114
Message ID:
00395118
Views:
11
>Hi
>
>I am building a tiered application with VFP, and the presentation layer is thin. All data is sent in batches as and when needed. This means that occationally I need to update the data in a grid.
>
>I used RecordSourceType = 1 (Alias). However, if I close the table, repopulated it and open the table again, the grid has by now become empty, and all the columns disappeared.
>
>I created a small routine in Init that saved values such as columnCount and the ControlSource of each column, and reset all values back to what they were before the table was closed. This resets the columns OK, but no data is displayed. Is there any way I can get the grid bound to the table again to display the new data?
>
>Would be grateful for some help.
>
>Steven Edge

Closing the table makes the grid lose its RecordSource, which accounts for this behaviour.

One approach would be to create a cursor to power the grid. You could then ZAP it and repopulate it with impunity.

Otherwise, be sure to set your grid's .RecordSource to "" and your columns' .ControlSources to "" before closing the table. You can then re-establish them programmatically when you re-open the table.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform