Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: dan delpuerto
  
 
 
 dan delpuerto
 To: Zaheer Ahmed
  Where is Zaheer Ahmed?
 Peshawar
 Pakistan
 Zaheer Ahmed
 Tags
Subject: RE: Enable/Disable Textbox Control in Grid
Thread ID: 78185 Message ID: 78968 # Views: 4 # Ratings: 0
Version: Visual FoxPro 7 Category: Grids
Date: Tuesday, October 11, 2005 5:00:21 PM         
   


Sample: grid1, column1, and text1


1. create method (in thisform) say "SetFlag"
  in SetFlag method:
    parameter goAhead
    if goAhead
       thisform.Grid1.column1.text1.enabled = <condition>
    else
       thisform.Grid1.column1.text1.enabled = .T. && reset
    ebdif
2. In Grid1.column1.text1
   .gotfocus method:
 
        thisform.SetFlag(.T.)
  
   In .lostFocus method:
    
        thisform.SetFlag(.F.)

This however disables only 1 column. You may apply this to other columns

> Hi Experts,
>
> Need help for Grid Control
>
> The following command changes colors of rows if condition is true.
>
> thisform.grid1.SetAll("DynamicBackColor", ;
> "IIF(rowtype='ORDER', RGB(255,255,255) ;
> , RGB(128,128,255))", "Column")
>
> How can I apply the same condition to enable or disable textbox control of the column (there is no DynamicEnabled property).
> I am using Visual Foxpro 7.0
>
> Can anyone help me ?


ENTIRE THREAD

Enable/Disable Textbox Control in Grid Posted by Zaheer Ahmed @ 9/28/2005 7:33:14 PM
RE: Enable/Disable Textbox Control in Grid Posted by Mike Gagnon @ 9/28/2005 8:44:37 PM
RE: Enable/Disable Textbox Control in Grid Posted by Zaheer Ahmed @ 9/29/2005 6:06:53 AM
RE: Enable/Disable Textbox Control in Grid Posted by dan delpuerto @ 10/11/2005 5:00:21 PM