Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Yet More Grid Problems...
Message
From
28/08/1998 14:38:22
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00131116
Message ID:
00131118
Views:
19
>Hi,
>
>I'm using a grid (RESULTS) to display search results. I have its recordsource set to a cursor named GUL. When successive searces are run, GUL is emptied and then re-filled with the new results. The problem, however, is that since GUL hangs on to the deleted records, the scroll box in the scroll bar on the right side of the grid gets smaller with each successive search, leading to a possibly confusing situation with the user.
>
>To solve this problem, I tried destroying and re-creating the cursor. This totally wipes out my grid, however. My grid has columns named PRE and SUF and EXC, etc.. Once the cursor is re-built, a command such as:
>
>WITH THISFORM.RESULTS
> .RECORDSOURCE='GUL'
> .PRE.CONTROLSOURCE='GUL.PRE'
> .SUF.CONTROLSOURCE='GUL.SUF'
> .EXC.CONTROLSOURCE='GUL.EXC'
>ENDW
>
>yields an 'Unknown member PRE' error. If I look at the grid in the Debugger after the error, it no longer has the column names that I assigned to it.
>
>I tried to switch strategies and use a .DBF which I then PACK between searches, but that has the same problem. Something about closing/packing the grid's source table is causing it to lose information.
>
>How can I clear the records out of my grid's record source without wiping out the grid?!?
>
>Any help appreciated,
> Rob

You can ZAP cursor and the refill it with new data.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform