Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selected rows in grid to readonly
Message
 
 
À
30/03/2004 00:46:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00890636
Message ID:
00890806
Vues:
25
This message has been marked as the solution to the initial question of the thread.
Evelyn,

I think I'd tackle this UI a little differently. Use the grid as a completely read only record selection, and have a set of VFP controls under the grid and Enable them in the grid.AfterRowColChange if the current user = author.

You can't just set the this.ReadOnly = .f. without some other code somewhere that would set it back .t. You can make it a logical expression instead:

this.ReadOnly = ( author = user )

or if the fields are character

this.ReadOnly = ( author == user )


>my table has description, author and date. when user is equal the author, i want the row to be editable.
>
>initially, i want grid to be readonly. i should have a command button that should set all rows equal to author to be editable.
>
>i tried your suggestion, on the when() of each text in my grid, i do
>
>
>if author=nuser
>   this.readonly = .f.
>endif
>
>
>but when i run the form, i see all rows as editable even if author is not equal to user.
>
>i am sure that user is equal the author but it does not set it as editable.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform