Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ABS grid question...
Message
 
 
To
24/09/2001 22:23:50
N. Lea
Nic Cross Enterprises
Valencia, California, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00560305
Message ID:
00560356
Views:
22
>>>I currently have a grid and in one of the columns is the control source of ABS(report1.total). Now the file actually reflects a negative and since the grid is eyecandy, it does not change - as you know. Now. I have this other column with a checkbox. When the user clicks on the checkbox, I would like for the column showing the ABS to actually reflect the database value just for this line item. Is this possible?? So when clicked it would show a negative. If the database showed a postive, the column would go unchanged. Thanks in advance@@
>>
>>How about adding a second textbox to that column, which would have the raw controlsource - without the abs(). On checkbox just flip the .dynamiccontrol property of that column to use one textbox or the other one.
>
>is this what you are suggesting? I am very new to using the grid dynamic properties. i assume I would still leave the controlsource of the column the same and set different control values to the actual textboxes, correct? Here is my dynamic code:
>
>IIF(lSetControl=.T.,txtABSTotal.Visible=.T.,IIF(lSetControl=.F.,txtRawTotal.Visible=.T.,txtABSTotal.Visible=.T.)))

This is incorrect, You can either go with Column.DynamicCurrentControl, or you can try to put code in CheckBix.InteractiveChange event, but it would work for one current row only, e.g.
if this.value
   this.parent.parent.colTotal.currentcontrol="text2" && (text with normal controlsource without abs())
else
  this.parent.parent.colTotal.currentcontrol="text1"
endif
This is untested, so I'm not 100% sure, it would work. DynamicCurrentControl will work 100% sure, but it would slow down your grid. See, which approach would work for you.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform