CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 [RESOLVED by workaround] Hide Grid Row Item (label) PHP

Print topic Send  topic

Author Message
sosamv

Posts: 50
Posted: 02/04/2009, 9:21 AM

Hi guys i need to optionally hide a link that each grid item has.

example:

Name: item1 Link1
Name: utem2 - (This item is sold out so i hide the link)
Name: utem3 Link3
Name: utem4 Link4


I tried the beforeshow event of the link itself like this:
$tblingreso1->lnkGenerar->visible=false;

but doesnt work :S

any clues?
View profile  Send private message
jjrjr1


Posts: 942
Posted: 02/04/2009, 9:34 AM

Hi

Try in the before show event the Hide Show Component action and set the appropriate values for the action.

Have fun

_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
sosamv

Posts: 50
Posted: 02/04/2009, 9:56 AM

Hi jjrjr1!! and thanx again for your answers, can you be a little more specific? what do you mean by "Hide Show Component action"? visible=false;? or what? lol, when i think i know enough about CCS this problems arouse.

thanx
View profile  Send private message
sosamv

Posts: 50
Posted: 02/04/2009, 10:05 AM

Yo! i found the option you're talkin about, but doesnt work, what beforeshow event? the one for the element i need to hide? or the grid itself?

Thanx
View profile  Send private message
jjrjr1


Posts: 942
Posted: 02/04/2009, 10:23 AM

If your hiding the link, then just the link


_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com
View profile  Send private message
sosamv

Posts: 50
Posted: 02/04/2009, 10:37 AM

still nothing =( what could be wrong??
View profile  Send private message
datadoit
Posted: 02/04/2009, 10:55 AM

Help us out a wee bit here by giving us more info please. Toss over
some specifics, particularly the code in question. This will keep us
all from playing forums tag. Ex:

//YourComponent_BeforeShow @4-79CE29D5
function YourComponent_BeforeShow(& $sender)
{
$YourComponent_BeforeShow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $YourComponent; //Compatibility
//End YourComponent_BeforeShow

//Custom Code @5-3E200586
// -------------------------

yada yada yadda

// -------------------------
//End Custom Code

//Close YourComponent_BeforeShow @4-B0467401
return $YourComponent_BeforeShow;
}
//End Close YourComponent_BeforeShow
sosamv

Posts: 50
Posted: 02/04/2009, 11:25 AM

Heres the ugly work-around i used:

  
//tblingreso1_lblGenerar_BeforeShow @93-C555826E  
function tblingreso1_lblGenerar_BeforeShow(& $sender)  
{  
    $tblingreso1_lblGenerar_BeforeShow = true;  
    $Component = & $sender;  
    $Container = & CCGetParentContainer($sender);  
    global $tblingreso1; //Compatibility  
//End tblingreso1_lblGenerar_BeforeShow  
  
//Custom Code @94-2A29BDB7  
// -------------------------  
	if($tblingreso1->isCorrido->GetValue()==0){  
		 $tblingreso1->lblGenerar->SetValue("<a href='adm_ingresos.php?Generar=".$tblingreso1->ID_Ingreso->GetValue()."'>Generar</a>");  
	}  
// -------------------------  
//End Custom Code  
  
//Close tblingreso1_lblGenerar_BeforeShow @93-DEE1B59F  
    return $tblingreso1_lblGenerar_BeforeShow;  
}  
  

I end up using a Label insted of a link, i dont know why this is happening, i wasnt able to hide links from the grid, the link had a parameter taken from the datasource column, an ID, could this be the cause?

Thanx
View profile  Send private message
Gena

Posts: 591
Posted: 02/04/2009, 12:04 PM

Put Pannel arount your link code, then use Hide Show Component action in the Before Row Show.
_________________
Gena
View profile  Send private message
sosamv

Posts: 50
Posted: 02/04/2009, 1:15 PM

will do that the next time =)

Thanx everyone!

Jerry
View profile  Send private message
damian

Posts: 838
Posted: 02/04/2009, 2:40 PM

please note also -

if($tblingreso1->isCorrido->GetValue()==0){.... 

if used on a page with lots of items - will hide all of them after the first one that is sold out - you need an if else statement so you can set it visible and hidden
_________________
if you found this post useful take the time to help someone else.... :)
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.