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

 How to hide the grid under the search when no records are displayed or until a search has been intiated

Print topic Send  topic

Author Message
gregmelson

Posts: 19
Posted: 09/20/2008, 1:01 AM

Hello everyone

I made a 4 combo box search grid based on the DependentListBox3 example in CodeCharge example pack 2 it works great besides one thing. The gird must not display when I first open the page

I added the code as told to in the instructions (check //Custom Code @107-2A29BDB7)

I think it's beacause the beforeShowRow, does anyone know how to override this? or what it could be?

<?php
//BindEvents Method @1-2AED858E
function BindEvents()
{
global $can_countries_can_link_ye1;
$can_countries_can_link_ye1->CCSEvents["BeforeShowRow"] = "can_countries_can_link_ye1_BeforeShowRow";
}
//End BindEvents Method

//can_countries_can_link_ye1_BeforeShowRow @2-3A11395A
function can_countries_can_link_ye1_BeforeShowRow(& $sender)
{
$can_countries_can_link_ye1_BeforeShowRow = true;
$Component = & $sender;
$Container = & CCGetParentContainer($sender);
global $can_countries_can_link_ye1; //Compatibility
//End can_countries_can_link_ye1_BeforeShowRow

//Custom Code @107-2A29BDB7
// -------------------------
global $can_countries_can_link_ye1;

if ($can_countries_can_link_ye1->ds->RecordsCount == 0)
$can_countries_can_link_ye1->Visible = False;
//DataSource
// -------------------------
//End Custom Code

//Close can_countries_can_link_ye1_BeforeShowRow @2-79AF7E74
return $can_countries_can_link_ye1_BeforeShowRow;
}
//End Close can_countries_can_link_ye1_BeforeShowRow


?>


_________________
greg
View profile  Send private message
mentecky

Posts: 321
Posted: 09/20/2008, 8:39 AM

Try moving that code to the grid's BeforeShow rather than BeforeShowRow event.

Rick
_________________
http://www.ccselite.com
View profile  Send private message
gregmelson

Posts: 19
Posted: 09/22/2008, 7:26 AM

Hi Mentecky

Thank you so much, I was pulling my hair out trying to figure this out, thank you :)

Greg
_________________
greg
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.

PHP Reports

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

Home   |    Search   |    Members   |    Register   |    Login


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