GeorgeS
Posts: 206
|
| Posted: 07/21/2004, 4:16 PM |
|
HI,
I have a list of radio buttons and I want the first one to be selected by default but for some reason it is always the last one...
Is there a setting for this. I'm using ListOfValues and the last item in the list gets the focus.
_________________
GeorgeS |
 |
 |
E43509
Posts: 283
|
| Posted: 07/21/2004, 8:00 PM |
|
What language?
|
 |
 |
GeorgeS
Posts: 206
|
| Posted: 07/22/2004, 11:53 AM |
|
PHP & ASP
_________________
GeorgeS |
 |
 |
peterr
Posts: 5971
|
| Posted: 07/22/2004, 12:51 PM |
|
You can specify the default key value in the "Default Value" property.
Thus if for example your Data Source is: "1;abc;2;def;3;ghi" then you can enter "2" (without quotes) into the "Default Value" property to select the 2nd value by default, or enter "1" to select the 1st value.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
GeorgeS
Posts: 206
|
| Posted: 07/23/2004, 3:08 PM |
|
Peter,
here is my list"
%;Any Mount Type;b;Bulkhead;2;2-Hole Mount;4;4-HoleMount
If I enter % in the Deafault Value - I'm getting an error
If I enter b or 2 - nothing is changed - the last item in the list is selected
Any suggestions?
_________________
GeorgeS |
 |
 |
peterr
Posts: 5971
|
| Posted: 07/23/2004, 4:01 PM |
|
Your values look like text values because % or b cannot be a number, unless you define b as a variable and assign some value to it.
Therefore you'd need to enter into the Default Value "%" or "b" in quotes to treat it as a text value. The Data Type property would also need to be set to Text. This works well for me, at least with ASP.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
peterr
Posts: 5971
|
| Posted: 07/23/2004, 5:53 PM |
|
BTW, I don't understand why the default value = 2 didn't work for you. It works OK for me with ASP.
You may want to check if your HTML didn't get damaged somehow, or recreate your listbox. Otherwise our support may be able to help you analyze this issue in more detail.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
DreXor
|
| Posted: 08/06/2004, 2:17 PM |
|
you use "CHECKED" in the radio tag to denote defaulted like :
<input type="radio" name="status" value="open" Checked>
<input type="radio" name="status" value="pending">
<input type="radio" name="status" value="closed">
|
|
|
 |