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