Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ZAPping a table displayed in a grid
Message
From
10/03/2000 11:05:23
 
 
To
10/03/2000 09:11:50
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00344045
Message ID:
00344232
Views:
19
Hi everyone,

Thanks for all your replies...
The changing of the recordsource does not work for me in this situation, as mentioned it also changes the controlsource of the grid's columns. Most of the column sources in the grid are calculated, and, at that point, it would be easier to go with creating the grid programatically.
I do have a workaround which I mentioned below..
I was just surprised and intrigued that the act of ZAPping the table (then populating it again) would cause the grid not to display the table's contents.
Reusing the records works just fine - I was hoping there was a logical explanation for this ?!?!

Thanks
Ashley



>Hi Ashley.
>
>>> process to zap and then re-populate a table displayed in a grid on page 2 and then makes page 2 active.
>The result was an empty grid display. <<
>
>My standard method for changing the Contents of the grid's RecordSource is to either use a parameterized view and requery it when necessary or to use an updateable cursor and zap it when necessary like so (where csrCategory is the grid's RecordSource):
>
>*** Rebuild the cursor used as the recordSource for the grid
>SELECT csrCategory
>ZAP
>SELECT * FROM Categories WHERE Categories.Cat_No = Thisform.Cat_No ;
> INTO CURSOR Temp NOFILTER
>SELECT csrCategory
>APPEND FROM DBF( 'Temp' )
>USE IN Temp
>GO TOP IN csrCategory
>This.nRecNo = 1
>This.Refresh()
>
>I never have a problem doing it like this.
>
>Marcia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform