How to bind enum options to DevExpress.RadioButtonList
Example code:
开发者_JS百科@Html.DevExpress().RadioButtonList(settings => {
settings.Properties.DataSource = Enum.GetNames(typeof(SEICCV.Web.Models.eTipoControle));
settings.Name = "radio";
}).GetHtml()
@(Html.DevExtreme().RadioGroupFor(m=>m.eTipoControleValue)
.DataSource(Html.GetEnumSelectList<SEICCV.Web.Models.eTipoControle>().Select(i => new { Value = short.Parse(i.Value), Text = i.Text.Value }))
.ValueExpr("Value")
.DisplayExpr("Text")
.Value(Model.eTipoControleValue)
.Layout(Orientation.Horizontal))
精彩评论