Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid white space
Message
De
03/11/2004 15:11:20
 
 
À
03/11/2004 14:22:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 5
Divers
Thread ID:
00957515
Message ID:
00957791
Vues:
18
Try This instead:

In the form load method, define a cursor to use as the grid's RecordSOurce like this:
SELECT * from MSTR WHERE 0=1 INTO CURSOR csrMstr READWRITE NOFILTER
Now, in the form designer, set up your grid with the RecordSource of csrMstr and a RecordSourceType of 1-Alias. You can even lay out your columns visually using the MSTR table and editing the controlSources of the columns to point at csrMstr.

Add a method to your form called ResetGrid. Then, when you need to change what is displayed in the grid, just use this code:
Thisform.ResetGrid()
This code in the form's ResetGrid() method:
*** Rebuild the cursor used as the recordSource for the grid
SELECT csrMstr
ZAP
lcWhere = [UPPER(inname) = '] + UPPER(TRIM(thisform.pageframe1.page1.text1.Value)) + [' and nam1 = '] + thisform.pageframe1.page1.text4.Value + [']
SELECT * FROM MSTR WHERE &lcWhere INTO CURSOR Temp NOFILTER
SELECT csrMstr
APPEND FROM DBF( [Temp] )
USE IN Temp
GO TOP IN csrMstr
IF RECCOUNT( [csrMstr] ) > 0
  Thisform.PageFrame1.ActivePage = 2
  Thisform.PageFrame1.Page2.Grid1.Refresh()
ELSE
  MESSAGEBOX( [No Records Match Your Criteria] )
ENDIF
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform