PDA

View Full Version : [CLOSED] Radio .Checked and .Value order dependency issue



ATLAS
Dec 03, 2013, 11:05 AM
After messing around for a while, I realised that the .Checked and .Value attributes seem to have an order dependency. If .Checked is not last, it has no effect. The following will not show Item 2 as checked.



Html.X().RadioGroup()
.ID("RadioGroup4")
.FieldLabel("Multi-Column(Vertical)")
.ColumnsNumber(3)
.Vertical(true)
.Items(
Html.X().Radio().ID("Radio17").BoxLabel("Item 1").Value("AA"),
Html.X().Radio().ID("Radio18").BoxLabel("Item 2").Checked(true).Value("BB"),
Html.X().Radio().ID("Radio19").BoxLabel("Item 3").Value("CC"),
Html.X().Radio().ID("Radio20").BoxLabel("Item 4").Value("DD"),
Html.X().Radio().ID("Radio21").BoxLabel("Item 5").Value("EE")
)

Daniil
Dec 03, 2013, 12:26 PM
Hi @ATLAS,

I guess you need to use InputValue instead of Value. I don't think a Checkbox's Value should be used at all.