Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is happening with my grid
Message
De
18/09/1998 10:50:58
 
 
À
18/09/1998 10:48:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00138178
Message ID:
00138213
Vues:
14
>>>>>>>I have a grid displaying data of a cursor. The initialy empty cursor is created when i issue a SQLEXEC() in the Load event of my form with a whereclause that will never select any records.
>>>>>>>When i reissue my SQLEXEC(), but this time with data my grid looses its member-objects and its recordsource.
>>>>>>>This is probably because the cursor is closed and recreated when i reissue a SQLEXEC().
>>>>>>>
>>>>>>>Does anybody know the 'workaround' for this problem?
>>>>>>>
>>>>>>>Marco Beuk.
>>>>>>
>>>>>>Any time you rebuild the cursor, you should also reset grid properties: recordsource, column.controlsource(s). Another workaround is to base grid on permanent cursor and fire ZAP and APPEND FROM sqlcursor after each SQLEXEC.
>>>>>
>>>>>The funny thing, but it won't work for me.... I had the grid and I recalculated the content. I tried this trick and it won't work...
>>>>
>>>>It works Ok here. What actually doesn't work?
>>>The grid loose all column's properties (controlsource, header etc)
>>
>>You don't rebuild cursor itself, do you? I mean you do:
>>Select curGridsource
>>ZAP
>>Select curTemp
>>cDbf=dbf()
>>Select curGridsource
>>Append from &cDbf.
>>Thisform.Grid.Refresh
>>
>>This case it should work OK, because grid still have the same recordsource.
>
>Sure, I did the same thing. But it always failed... I will try it again over the weekend

I forgot to mention one more thing: curGridsource should be created by CREATE CURSOR.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform