Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid white space
Message
De
04/11/2004 06:57:09
 
 
À
03/11/2004 15:11:20
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:
00958015
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
>
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform