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

 Keep ListBox state between post

Print topic Send  topic

Author Message
wlad

Posts: 7
Posted: 01/17/2005, 2:29 AM

Hi,

I've an editable datagrid wich is populated by a db table based on the selected value of a ListBox ( cmbLangId ), ... very simple. I just want to get the querystring param of the selected value of cmbLangId to assign it to the ListBox.
I've tried:
- (Properties box of cmbLangId ) Default Value: CCGetFromGet("LangId",0)

But It doesn't work, how can I sort this very basic things ? Is there any ListBox function in CodeCharge Studion PHP that propose to set the selected value of a listbox dynamically?

Thanks in advance,

wlad
View profile  Send private message
peterr


Posts: 5971
Posted: 01/17/2005, 9:14 AM

Default Value should work if used properly. Maybe your function returns text instead of number, or there is something else we're missing.
Here are examples of setting control values dynamically:
http://docs.codecharge.com/studio/html/ProgrammingTechn...ntrolValue.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
wlad

Posts: 7
Posted: 01/17/2005, 10:03 AM

Thanks for reply peterr,

I've set the dropdown property "Data Type" to integer .. doesn't do it.
Maybe this ?: If I put the "Data Source Type" to ListOfValues (which is the case), I have a :
--------- Warning: ListBox LangId: Wrong List Source property value.
Therefore I set that property to "Table/View", (which isn't the case)

In the Before Show of the control:
I've tried : $theform->LangId->SetValue(0);
and diffrent quind of things ... not sorted :(

Any idea ?
View profile  Send private message
peterr


Posts: 5971
Posted: 01/17/2005, 10:04 AM

What about:
$theform->LangId->SetValue(1);
(or some other value that actually is used in your listbox)
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
wlad

Posts: 7
Posted: 01/17/2005, 10:17 AM

The drop down looks like this:
(Value | Text Value)
| 0 | Default (Selected)
| 1 | English
| 2 | French
...
I want to get the value already present in the querystring and assign it to the dropdown to preserve user input between posts.
The dropdown is used in the WHERE clause of the query populating the editable datagrid ...
View profile  Send private message
peterr


Posts: 5971
Posted: 01/17/2005, 10:44 AM

OK, so what about that code above?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
wlad

Posts: 7
Posted: 01/18/2005, 1:03 PM

Sorted.
I forgot to set the ListOfValue together with the DataSource, in step I was setting the select value straight in HTML code. It works well now,
Thanks anyway,

Wlad
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.