Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 To: Imran Khan
  Where is Imran Khan?
 Lahore
 Pakistan
 Imran Khan
 Tags
Subject: RE: Problem with Grid Object
Thread ID: 248951 Message ID: 248986 # Views: 3 # Ratings: 1
Version: Visual FoxPro 9 Category: Grids
Date: Saturday, December 26, 2009 9:05:22 AM         
   


> >
> >
> > Aside from what Stefan suggests, you can likewise go to the Property window, navigate to that column and place something like this in the DynamicCurrentControl property:
> >
> >
IIF(Balance-Pic = 0,"command1","command2")
> > 

> > Where command1 is the enabled button and command2 is the disabled button.
> >
> > Jun Tangunan
> > http://weblogs.foxite.com/sandstorm36/default.aspx
> > http://www.coderisland.com/forum/viewforum.php?f=10
>
> I try following example:
>
> ThisForm.Grid1.Column5.DynamicCurrentControl=IIF(Order.Bal=0,"command1","command2")
>
> but found error "Expression is invalid:Use a valid expression for DynamicCurrentControl"
>
> Kindly help in this regard
>
> Imran

Try using the PEM window and paste it there like this:



However, instead of column2 as shown in the image, do that on Column5.

Or you can try doing it via command approach but enclose the IIF() with ' like this:
ThisForm.Grid1.Column5.DynamicCurrentControl = 'IIF(Order.Bal=0,"command1","command2")'

Or

ThisForm.Grid1.Column5.DynamicCurrentControl = "IIF(Order.Bal=0,'command1','command2')"




Jun Tangunan
http://weblogs.foxite.com/sandstorm36/default.aspx
http://www.coderisland.com/forum/viewforum.php?f=10

ENTIRE THREAD

Problem with Grid Object Posted by Imran Khan @ 12/25/2009 5:02:09 PM
RE: Problem with Grid Object Posted by M. Akram Bhatti @ 12/25/2009 6:19:11 PM
RE: Problem with Grid Object Posted by Yuri Rubinov @ 12/25/2009 7:02:53 PM
RE: Problem with Grid Object Posted by ho me @ 12/26/2009 1:39:41 AM
RE: Problem with Grid Object Posted by Imran Khan @ 12/26/2009 8:05:42 AM
RE: Problem with Grid Object Posted by Stefan Wuebbe @ 12/26/2009 8:11:51 AM
RE: Problem with Grid Object Posted by Jun Tangunan @ 12/26/2009 8:22:12 AM
RE: Problem with Grid Object Posted by Imran Khan @ 12/26/2009 8:52:19 AM
RE: Problem with Grid Object Posted by Jun Tangunan @ 12/26/2009 9:05:22 AM
RE: Problem with Grid Object Posted by ho me @ 12/26/2009 11:01:14 AM