Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid and Requerying
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Grid and Requerying
Divers
Thread ID:
00302205
Message ID:
00302205
Vues:
49
Hi.
I am still grappling with a Grid problem and cannot find a resolution.
Scene is as follows:

1. I have set up a Grid on a search form which dispalys fields from a cursor based on a result set
2. RecordSource Type =Alias recordSource = ' ', ColumnCount = 4
3. In the Init of the grid, I have a method(SetColumns) which sets Column Sources,captions etc for each column
e.g. .caption=MyCaption .RowSource=sma_name .FontName = 'Courier New'
(I do it like this because each client needs different fileds..these are help on a paramter file)
4. On My Search button , I have the following:
ThisForm.MyGrid.RecordSource = ''
Select * from MySourceFile into Cursor Mycursor
ThisForm.MyGrid.RecordSource = MyCursor

What happens is, the fields in the Grid, are not as per Point 3 above, but it is just showing the first 3 fields from the file
(The Caption,Font,headers etc display correctly)

If I call my SetColumns methos after point 4 above, I just get the first record from the
result set displayed in EVERY row, but again with the incorrect columns.

I've spent weeks trying to sort this out and would reaaly appreciate any help

Regards,
Gerard
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform