Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Divers
Thread ID:
00396327
Message ID:
00396550
Vues:
7
>>>You need to blank the grid.recordsource to "" before anymodification on the cursor and then put it back to its value.
>>
>>I think you might find that setting the grid's .RecordSource = SPACE(0) is better.
>
>Why?

Not totally sure....this was something I picked up here from UT quite some time ago. If I remember correctly (and that's a difficult thing to do), using SPACE(0) greatly assists in retaining the current grid definition for the columns where setting it to "" destroys them. I will admit it's been a while since I've had to look at the reason why.

I have a self building grid where a programmer populates an array and then calls a method to construct the grid according to the contents of the array. Because it rebuilds the entire definition of the grid, I don't run into the issue of the grid losing it's definition when I create a new cursor for a .RecordSource. I do know that my .BlankGrid method does set it to SPACE(0).

Steve
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform