Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Occasionally disappearing grids
Message
From
30/08/2010 20:46:51
 
 
To
30/08/2010 20:41:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01479327
Message ID:
01479328
Views:
52
>I'm having this problem with occasionally disappearing grids.
>
>Each of the three grids for which this is happening are on different pages of a pageframe. (There are a few other pages as well, but they are not relevant.). They are all based on the same class (a sub-class of my base grid class)
>
>The columns for each grid, as well as their RecordSources, are created in the Activate for the page they are on (only the first time, though).
>
>What I am getting, some of the time, is that the grid appears, has all the columns I am expecting to see, but no rows appear. I can tell that the recordsource (a cursor) exists, has records, does not have a filter, and the record pointer is on the first record.
>
>MOST of the time, when I bring up this form, the grids appear as desired. But some of the time (20% ??), the grids are blank. When they are, closing the form and re-opening it causes them to display properly. (When any of the grids are blank, they are all blank --)
>
>I have used the base grid class which creates the recordsource and add columns a zillion times, throughout all my applications. (Most of which are very heavily grid-reliant). I have not seen this behavior before.
>
>I cannot even begin to guess what may be happening here. Any thoughts?

post your code in the activate of the page - usually this can be fixed by setting the grid recordsource to "" before you define the grid and then making sure you go through the clean define if the cursor disappears for any reason (gets reloaded or deleted an recreated from a secondary sqlexec() query or something).

Something in your base code or is maybe resetting the grid's properties which is wiping out the recordsource?

Put a break on one of the cursor's disappearing or one of the grid's recordsource changing and see where it stops.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform