从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()
标签:
DevExpress
相关问题
- How to create DevExpress XPO dynamically with mult
- How do I color a cxgrid based on table value?
- Does Devexpress GridControl for win forms support
- Get Checked Items In A DevExpress CheckedComboBoxE
- Dynamically adding Devexpress GridControl to C# wi
相关文章
- winform devexpress能实现下图中的内容吗
- winform devexpress能实现下图中的内容吗
- Windows Form Memory leak
- DevExpress LookUpEdit And Coded UI Tests
- How include a image in devexpress datagrid
- Devexpress ASPxGridView GetSelectedFieldValues Can
- DEVEXPRESS - xtrareport - page break
- Calculating a ASPxGridview Column in DevExpress
你可以去官方文档看一下
settings.Name 设置错了,应该和属性名一致才可以绑定数据