Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checkbox in a grid
Message
De
01/12/2004 04:00:06
 
 
À
01/12/2004 03:40:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00965988
Message ID:
00965992
Vues:
10
Hi Kusnardi,

I still don't understand why you want to do this in code? I showed you twice how to avoid regenerating the grid, didn't you understand my solution, or are there other reasons? My solution is the way to do it according to all litterature on the subject. The point is you NEVER change the controlsource or the recordsource, once you do that the grid will 'reset' to default. If you instead ZAP the cursor, and append the new data from a temporary cursor (or table) all your problems are gone. Believe me, I had a similar problem, and I also thought I should fix it by regenerating the grids. But after I got the correct advice and understood the idea, it took me five minutes to fix five different apllication with about twenty different grids. And my programs also ran significantly faster! But, if you want to do things in the wrong way which is much slower and a real PITA, be my guest. If I did not describe the solution well enough, here it is once again:
SELECT whatever INTO CURSOR tempCursor 
*Or use some other procedure to get the new data into a temporary cursor or table
SELECT myGridControlCursor && your controlsource
ZAP
APPEND FROM DBF('tempCursor') && your temporary cursor or table
mygrid.REFRESH()
Isn't this a lot easier than writing a bunch of code to recreate the cursor? :-)


>Hi,
>
>I manage to add the checkbox into a grid using addobject command.
>But I can't click the checkbox even I set all the control in a grid to readonly = .f. and enabled = .t. Other control can be edited but not the checkbox. Please help if anyone know the solution. Thanks
>
>regards,
>Kusnardi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform