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

 Hide a Grid if it dosn't contain any records

Print topic Send  topic

Author Message
boris

Posts: 14
Posted: 08/03/2006, 6:45 PM

Hi,

I have an include file which queries a database and displays the last 5 records.

<!-- BEGIN Grid LithoOffers -->  
<h2>Latest 5 offers:</h2>  
<table summary="Latest litho offers" class="indent">  
  <!-- BEGIN Row -->  
  <tr><td>{Age} {Manufacturer} {Model}</td></tr>  
 <!-- END Row --></table>  
<p class="small readmore"><a href="#">More »</a></p>  
<!-- END Grid LithoOffers -->

This file is included in another page but i want to hide it completely if it dosn't contain any records.

Can someone please help me?
View profile  Send private message
Maybe
Posted: 08/03/2006, 8:11 PM

In a before show use:

If yourGrid.Recordset.EOF Then
yourGrid.Visible = False
Else
yourGrid.Visible = True
End If
Maybe
Posted: 08/03/2006, 8:14 PM

Also you will have to use:

inludeFileName.yourGrid.....
boris

Posts: 14
Posted: 08/03/2006, 8:28 PM

Thanks for the reply.

I put the routine in the include page Grid's Before Show and it works a treat.

Thanks!
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.