CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 Altering a ccsListbox dynamically

Print topic Send  topic

Author Message
Bil Simser
Posted: 01/05/2004, 7:33 PM

Hi guys,

I'm wondering if I can do this. I have a listbox in ASP that's tied to a
datasource to get the list of values. The problem is that I also want to
prepend a value that's not in the database to the list. The list is data
driven and the db has an identity field so all IDs start at 1. I want to add
a manual value of 0 with "root" as the text to the listbox. I can't see how
to do this in something like the Before Show event of the form or listbox.
Any ideas? Thanks.

-Bil

Edd


Posts: 547
Posted: 01/05/2004, 9:41 PM

Bil,

I might be looking at this simplistically but if you right click on the listbox in design mode and go to the <SELECT> option you can change the Select Value default from nothing to 0 by clicking on it.

Alternatively if you want to change the values of the listbox the Help has an example i.e.

BeforeShow event of the listbox:to set a default -

Function Registration_MonthBox_BeforeShow()

If IsEmpty(Request.QueryString("MonthBox")) then
Registration.MonthBox.Value = Month(NOW())
End if

End Function



_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
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.