Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to disable textbox in grid?
Message
De
09/12/2003 12:53:51
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
09/12/2003 12:29:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00857285
Message ID:
00857292
Vues:
25
>I am trying to restrict access to a limited number of controls contained in a grid depending on the state of the containing form. Some of the cnotained columns shouldn't be accessible/modifiable while others should be.
>
>Even though I set the ENABLED property of the column and the textbox to .f., I can still edit the information in the field.
>
>
> this.Parent.grdpoline.grid.column1.text1.Enabled = .f.
> This.Parent.grdpoline.grid.column1.txtinventorylu1.Enabled = .f.
> this.Parent.grdpoline.grid.column2.text1.Enabled = .f.
> this.Parent.grdpoline.grid.column3.txtQtyOrd.Enabled = .f.
> this.Parent.grdpoline.grid.column4.txtDescription.Enabled = .f.
>
>What am I doing wrong?
>
>Thanks in advance,
>
>Andrew

You're not doing what you're saying you did, modify enabled property of column not the control's in it (grid hierarchy doesn't let yours take over unless bound = .f.). ie:
with this.Parent.grdpoline.grid
 store .f. to ;
  .column1.enabled, ;
  .column2.enabled, ;
  .column3.enabled, ;
  .column4.enabled
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform