Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Lynda Loveland
  Where is Lynda Loveland?
 Minneapolis
 Minnesota - United States
 Lynda Loveland
 To: Ammar Hadi
  Where is Ammar Hadi?
 Al-Samawah
 Iraq
 Ammar Hadi
 Tags
Subject: RE: Conditionally show Checkbox
Thread ID: 228694 Message ID: 228698 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Grids
Date: Wednesday, May 20, 2009 9:30:27 PM         
   


> > Hi,
> >
> > I have this in the INIT of my form and it works great. I also would like a checkbox (Column6 of the grid) to either become invisible or have the background color the same as the background color of the row it is on for a certain condition. Basically, I do not want to show the checkbox for records where the Status has the word "Lawyer" in it.
> >
> >
> > THISFORM.Grid1.SetAll("DynamicBackColor", "IIF(AT('LAWYER',UPPER(Lawyer_Cursor.Status))>0, RGB(255,125,125), IIF(AT('CLIENT',UPPER(Lawyer_Cursor.Status))>0, RGB(255,240,140), RGB(255,255,255)))")
> > 

> >
> > Lynda
>
> Hi Lynda,
>
> Add a label to the column, let its caption="" and Use dynamiccurrentcontrol: like this
>
>
> grid.column6.DynamicCurrentControl=;
> 'iif(AT('LAWYER',UPPER(Lawyer_Cursor.Status))>0,"label1","check1")'
> 
> grid.column6.sparse=.f. && Or .t. depends on your preference
> 

>
> Ammar Hadi ................IRAQ
>
> My Foxite Weblog
>
> ---------------
> I I I really love foxite
> ___________________________

Hi Ammar,

That worked very nicely!

Thanks!

Lynda

ENTIRE THREAD

Conditionally show Checkbox Posted by Lynda Loveland @ 5/20/2009 9:04:20 PM
RE: Conditionally show Checkbox Posted by Ammar Hadi @ 5/20/2009 9:17:55 PM
RE: Conditionally show Checkbox Posted by Lynda Loveland @ 5/20/2009 9:30:27 PM