Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: ho me
  Where is ho me?
 
 Philippines
 ho me
 To: Imran Khan
  Where is Imran Khan?
 Lahore
 Pakistan
 Imran Khan
 Tags
Subject: RE: Problem with Grid Object
Thread ID: 248951 Message ID: 248991 # Views: 2 # Ratings: 1
Version: Visual FoxPro 9 Category: Grids
Date: Saturday, December 26, 2009 11:01:14 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

Hi,

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


I think that property is expecting a string. Which need to evaluated during grid's refresh event. Based on your code you just assign 'command1' or 'command2' to the property which is invalid.

Not tested.

hth

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