CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 hide rows in grid - CCS2

Print topic Send  topic

Author Message
Ed
Posted: 06/09/2003, 4:50 PM

Anybody any clue how to hide a row (record) in a grid, based on the value of one of the fields in that record.
Using CCS2 and PHP.

Many thanks,
Ed,

Pulp
Posted: 06/10/2003, 2:04 AM

If you manage to hide a row in a grid, based on whatever you want, I would be very interested on your solution... i am looking to templates for now, hope this will help me (us).
Crazy Master
Posted: 06/10/2003, 2:57 AM

I have some sleepless nights before I get this work but result was tremendous!!!

Add following code in Grid’s Before Show Row event to hide whole grid row
(all that you need change in the code are $form_name and $some_condition_to_hide):

global $form_name;
global $Tpl;
global $row_block;

$block_name = $Tpl->getname("", true);
if(!is_array($row_block)) {
$row_block = $Tpl->blocks[$block_name];
}
if($some_condition_to_hide) {
$Tpl->blocks[$block_name] = "";
} else {
$Tpl->blocks[$block_name] = $row_block;
}

glerma
Posted: 06/10/2003, 12:59 PM

I don't know if this is related to what Your trying to do, but I found this in the CCS Help Documents > 2.0
++++++++++++++++++++++++++++++++++
Control Level
One way to hide a control is to place code in the Before Show event of the control itself. Another method is to add code in the Before Show event of the form in which the control is contained. We shall begin with the first method where the code is added to the Before Show event of the control itself.

Add the Before Show event to the control.
Within the event, add the code below:
ASP
Function Responses_Author_BeforeShow()

Responses.Author.Visible = False

End Function
PHP
function Responses_Author_BeforeShow() {
global $Responses;

$Responses->Author->Visible = False;

}
++++++++++++++++++++++++++++++++++
ED
Posted: 06/11/2003, 3:40 PM

Crazy Master YOU ARE A .... STAR.
This works great , just where I was looking for.
Many thanks and I truly sorry for your sleepless nights but indeed the result was tremendous!!!
Hope I can give you the same help one day.

Sleep well tonight !! :-)

Ed,
Joe
Posted: 08/19/2003, 12:32 PM

This has been by far the only solution that worked for me. Thanks!

   


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.