CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 hide grid if no record was found

Print topic Send  topic

Author Message
Ahaa
Posted: 10/24/2004, 10:28 PM

I have multiple grid forms on a page and I want to hide them when the page is loaded and before a search is done.

If no records were found, don't show the gird. I have tried few codes like the one below but it doesn't work.

Any idea of what works. Please help.

$<form>before_show_event:

global $employees1;
$p=CCGetParam("emp_id",0);
if ($p > 0)
{
$employees1->Visible = True;
}
else
{
$employees1->Visible = False;
}

Thanks,
Ahaa
mrachow


Posts: 509
Posted: 10/25/2004, 12:22 AM

Hi Ahaa,

if your code do not work I suppose that you ever get an emp_id > 0.
Try to invert your if to see if hiding itself is working.

This code would show the grids if an emp_id > 0 is given but possibly there are not records for that id.

Please look into the Component Reference under chapter Examples and techniques. There is a paragraph about exactly that issue: Not showing a form if no records are found.

Regards,
Michael
_________________
Best regards,
Michael
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.