CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Hiding a listbox conditionally

Print topic Send  topic

Author Message
charles

Posts: 59
Posted: 12/01/2008, 2:53 AM

Hi '
Is there a diffrence between hiding a listbox and a textbox?
I am trying to programmatically hide a listbox in a record form based on the recordcount property of a grid.
I just found that the hiding part of my code is not working. I have sucessfully used this code before for textboxes without any problem.

Here is the code

if gridformname.recordset.recordcount<>0 then
recordformname.listbox.visible=false
End if

Unfortunately this code does not hide the listbox.
Can somebody please help me out?
Alternatively,how can i automatically disable the listbox based on the recordcount property of the gridform.
regards,
charles
View profile  Send private message
kevind

Posts: 251
Posted: 12/02/2008, 6:14 AM


use a panel instead - switch to HTML view of the page and locate the listbox control in the form you are trying to hide - then place the cursor on a blank line above and click the panel icon from the toolbox

put your cursor between the panel start and panel end comment tags and press enter to make some space

then highlight all of the code for the listbox and drag and drop it into the space between the panel tags

for controlling visibility you can add a before show action event to decide whether to show the panel - i normally make my panels not visible and then decide whether to show them based on record counts etc.

hope that helps
Kevin
_________________
thanks
Kevin

======================
CCS 3.2.x / ASP / MS Access /mySQL / PHP / jQuery / jQuery UI / jQuery Mobile
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.