Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamically Disabling textboxes in a grid 1

Status
Not open for further replies.

mccartmd

Programmer
Feb 3, 2003
63
US
Using VFP9, I can dynamically change forecolor using
this.setall (iff. . .) in the init of the grid from red and black. Can a person dynamically disable a textbox in a grid
(current record) if a logic named Reconciled in the current record of the grid is set to .T. Thank you in advance for any feedback
Mike
 
Can a person dynamically disable a textbox in a grid
(current record) if a logic named Reconciled in the current record of the grid is set to .T.

Sure you can. You just need 2 text boxes in the grid column that you want to dynamically disable - an enabled text box and a diabled text box. Then you use the column's DynamicCurrentControl to determine which one to display.

Code:
WITH This
  .Column1.DynamicCurrentControl = ;
       "IIF( GridRecordSource.Reconciled, 'txtDisabled', 'txtEnabled' )"
ENDWITH

Remeber, in order for this to work, the column's sparse property must be set to .F.

Marcia G. Akins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top