sosamv
Posts: 50
|
| Posted: 01/02/2009, 8:24 AM |
|
Thats pretty much it LOL, I attached a Label on the page Body and a grid below...on the grid's before_show event i want to $lbl->SetValue("BLA"); but refference dont work, I always end up using globals, but i dont like that any clues?
Thanx in advance!
|
 |
 |
jjrjr1
Posts: 942
|
| Posted: 01/02/2009, 11:50 AM |
|
Hi
Try
$Container->lbl->SetValue("BLA");
Have fun
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
sosamv
Posts: 50
|
| Posted: 01/02/2009, 1:34 PM |
|
Hi! thanx, but that doesnt seem to work, whet I have is:
let suppose:
<PAGE>
<"CCSCONTROL" I WANT TO MODIFY />
<GRID>
</GRID>
</PAGE>
grid_Before_Show{
$container->CCSCONTROL->SetValue("X");
}
This Doesnt Work...
other idea? Thanx!
|
 |
 |
damian
Posts: 838
|
| Posted: 01/02/2009, 1:58 PM |
|
how can you have a ccs object outside your grid?
also in above scenario i dont think it would work because your ccscontrol occurs before your grid and so doing a before show on your grid is too late to change the ccscontrol which has already been displayed...
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
sosamv
Posts: 50
|
| Posted: 01/02/2009, 2:40 PM |
|
Quote : <PAGE> <"CCSCONTROL" I WANT TO MODIFY /> <GRID> </GRID> </PAGE>
Quote :how can you have a ccs object outside your grid? also in above scenario i dont think it would work because your ccscontrol occurs before your grid and so doing a before show on your grid is too late to change the ccscontrol which has already been displayed...
hey damian! it is posible to have a control outside a form and call it from the BeforeShow Event:
function grid_Before_Show{
global $CCSCONTROL;
$CCSCONTROL->SetValue("X");
}
(The scenario above already works)
I'm just asking if it is posible to point to an object (Reference, without using GLOBALS) outside a form...
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 01/11/2009, 5:46 PM |
|
@sosamv, I'm not sure why you object to using globals. From my (limited) understanding of PHP, using globals (already created for you within the CCS code) is the correct way to go!
There is another technique, which consists of adding a template variable. Instead of adding a Label control from the Toolbox, manually type in something like {my_variable_name}. (curly braces and all!)
Then you can set this using the template global:
global $Tpl;
$Tpl->setvar("my_variable_name", "X");
HTH
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |