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

 listbox default value

Print topic Send  topic

Author Message
lammy

Posts: 49
Posted: 10/30/2008, 1:07 PM

I have a query regarding the listbox function,

If I remove the select value from the list box it will display the first drop down item in the list ie "Season 2008- 2009" . should this be automatically selected as the default value when the page originally loads and show only records in my corresponding grid for 2008 -2009 or do I need to assign the value using code. if code is needed could I get help with the coding.

Thanks

Lammy
View profile  Send private message
melvyn


Posts: 333
Posted: 10/30/2008, 1:45 PM

The default value you're talking is only selected when nothing is there, at first time.

After you select the value of your choice (let's say season 2005-2006), then this value always will be shown when you load this record.

Note:
The list of values must be provided in the Properties editor:
- Data Source Type: ListOfValues
- Data Source : [enter values list here, click on the ... to edit the list]

Note 2:
If you enter the values in the dropdown html properties, they must be selected each time you need to view. They get stored in the db, but current value isn't retrieved.





_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
View profile  Send private message
lammy

Posts: 49
Posted: 10/31/2008, 3:56 AM

Thanks for the reply melvyn

my values are held in a table, what I need is when they first go to the fixtures page it automatically filters and shows the latest seasons fixture (i.e the first list item in my listbox,) on first opening the page the 2008 - 2009 season is the first item in my listboxe, but the grid doesn't filter this selection, I need to press search for it to show this seasons fixtures. I didn't know whether the first drop down item in my list would automatically be the default value,
do I need to set the value in before show with code so the grid filters this seasons fixtures. if so could you help me with the code.

Thanks
View profile  Send private message
melvyn


Posts: 333
Posted: 10/31/2008, 9:15 AM

Well, now I understand: your listbox is located in the search form. And you need that selection working when page loads first time. Beforeshow can help, of course, I would do it in another way:
Edit the grid datasource and set a default value in the where condition. In Visual Query Builder find the field "Use default value if parameter is empty".

Will work equal as an event in beforeshow.
_________________
Melvyn Perez
Puro Codigo
http://purocodigo.com
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.