DevExpress 绑定下拉框数据

从Controller 传递viewdata 到view 通过下面的代码将传递过来的数据绑定到下拉文本框中,但是预览的时候没有任何数据显示 前端用的是DevExpress ,请大牛帮忙看一下!

@Html.DevExpress().ComboBox(
settings =>
{
settings.Name = "ComBox_MediaType";
settings.Width = Unit.Percentage(100);
settings.Properties.ValueType = typeof(string);
settings.Properties.TextField = "Name";
settings.Properties.ValueField = "ID";
settings.PreRender = (sender, e) =>
{
MVCxComboBox cmb = sender as MVCxComboBox;
cmb.Value =" ";
};
settings.Properties.ClientSideEvents.SelectedIndexChanged = "SelectedMediaType";
}
).BindList(ViewData["MediaTypeList"]).GetHtml()


浮云间
浏览 1212回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP