Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Control is Read Only
Message
De
17/01/2002 15:26:36
 
 
À
17/01/2002 13:23:25
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00606201
Message ID:
00606334
Vues:
25
>
>In your code you were using a grid that's already on form and directly assigning recordsource. When you do that original format is preserved. I suspect columns readonly property might be .t. and it overrides text1.readonly.
>
>Try like this :
>
>
with .grdForms
> .Recordsource = ''
> .Columncount = -1
> .Recordsource = 'showforms'
> *...  && Temporarily comment this part
>endwith
Cetin

Cetin:

The try above didn't work, but your comment about using the grid that's already on form set me on a different tack that has gotten it working. I just don't understand why what I did makes a difference.

When I first built the grid I was using a different recorsource (a read-only cursor). When I changed to using the table, I went into each column and reset the control source to default. All the ReadOnly properties were still at default (.F.).

I opened the proper table with an alias of SHOWFORMS and then went into the Grid Builder. I didn't make any changes there and clicked on OK.

The next time I ran the code, the grid was not ReadOnly.

There were some formatting problems where every line of the grid showed the same record. If you moved into the row, the values changed to reflect the proper record in the table. I fixed that by SELECT(ing) SHOWFORMS before I set the grid's RecordSource.

Any enlightenment as to why rebuilding the grid would remove the ReadOnly status would be appreciated.

At any rate, it's now working and I very much appreciate your help in making that happen.

........Rich
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform