I have an enum in model. I tried to created radio buttons for this enum in my view. That works fine and one checkbox is checked according to model value (like x o o).
@Html.RadioButtonFor(model => model.Data.CementType, ReMod.CementType.R, new { @id = "CementTypeR" })
<label for="CementTypeR">R</label>
@Html.RadioButtonFor(model => model.Data.CementType, ReMod.CementType.N, new { @id = "CementTypeN" })
<label for="CementTypeN">N</label>
@Html.RadioButtonFor(model => model.Data.CementType, ReMod.CementType.S, new { @id = "CementTypeS" })
<label for="CementTypeS">S</label>
However after I created EditTemplate for enum
@model ReMod.CementType
@Html.RadioButtonFor(model => model, ReMod.CementType.R, new { @id = "CementTypeR" })
<label for="CementTypeR">R</label>
@Html.RadioButtonFor(model => model, ReMod.CementType.N, new { @id = "CementTypeN" })
<label for="CementTypeN">N</label>
@Html.RadioButtonFor(model => model, ReMod.CementType.S, new { @id = "CementTypeS" })
<label for="CementTypeS">S</label>
and called this template from view
@Html.EditorFor(model => model.Data.CementType)
, than is not any checkbox checked (like o o o).
Thank you for any advice ...