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 |
 |
 |
|