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

 Hide image link if ...

Print topic Send  topic

Author Message
mtsoulis

Posts: 12
Posted: 10/07/2015, 10:48 AM

I have the image link " lkin". The control source of the imagelink is also " lkin"
I wanna keep hiden the imagelink when " lkin" is null
Any solution?
Thank you in advance!

_________________
Miltos-Greece
View profile  Send private message
eratech


Posts: 513
Posted: 10/08/2015, 3:48 AM

@mtsoulis

Add an event to the 'Before Show' of the imagelink with Hide-Show Component and set the compare by 'Text' and Hide. Then set Parameter 1 to 'lkin' and Control type and Parameter 2 to "" (empty quoted string) and 'Expression' type. Make sure you change the Property of Visible to 'Dynamic' or sometimes a 'Yes' or 'No' will override the Hide-Show.

If that doesn't work (and I haven't tested it recently), you can instead put a Custom Code in the link's Before Show with something like:

if ($Component->GetValue() == "") {  
$Component->Visible = false;  
}  

Usually 'null' gets converted by CCS into an empty string so you don't have to do is_set()
(or 'IsNothing' in ASP.NET)

Cheers

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
View profile  Send private message
mtsoulis

Posts: 12
Posted: 10/08/2015, 9:19 AM

I added additionally:

if ($Component->GetValue() == "") {    
$Component->Visible = false;    
}   
else  $Component->Visible = true;  

It works perfectly!
Thank you!!
_________________
Miltos-Greece
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.

MS Access to Web

Convert MS Access to Web.
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.