Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid problem
Message
From
21/12/1999 13:20:44
 
 
To
21/12/1999 09:45:28
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00306648
Message ID:
00306814
Views:
20
Hi John.

>> i have a grid that display query result with several search keyword. The grid is not displayed as designed earlier (the width of the columns were changed) when I try to re-assign the recourcetype even the name of cursor is same. <<

Anything that closes the RecordSource of the grid (like re-creating it bu re-running a query) will make it go blank. A better solution is to create an updateable cursor in the Form.Load using the following syntax:
CREATE CURSOR grdCursor( Yada C(10), ;
                         Nada C(20). ;
                         Blah C(30), ;
                         etc., etc, etc... )
Then you can visually asign grdCursor as the RecordSource of your grid and bind the grid columns to the fields in the cursor. Then, whenever you want to change what the cursor contains, you can call a method that does somethiong like this:

SELECT grdCursor
ZAP
*** Zapping is OK because it doesn't close the grid's RecordSource
SELECT Yada, nada, blah etc. etc. etc,... FROM SomeTables WHERE SomeCondition INTO CURSOR Temp
SELECT grdCursor
APPEND FROM DBF( 'Temp' )
USE IN Temp
ThisForm.MyGrid.SetFocus()

HTH

Marcia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform