Ser*_*Now 8 c# asp.net-mvc devexpress
我在视图中使用DevExpress.ComboBoxFor.
@using (Ajax.BeginForm(actionName: "DetailPartialAction", controllerName: "CeduleDepartementale", ajaxOptions: new AjaxOptions { HttpMethod = "POST", InsertionMode = InsertionMode.Replace, UpdateTargetId = "target" }))
{
@Html.DevExpress().LabelFor(x => x.CeduleDateFrom)
@Html.EditorFor(x => x.CeduleDateFrom)
@Html.LabelFor(x => x.CeduleDateTo)
@Html.EditorFor(x => x.CeduleDateTo)
@Html.LabelFor(x => x.WorkCenter)
@Html.DevExpress().ComboBoxFor(x => x.WorkCenter,
settings =>
{
settings.Name = "WorkCenter";
settings.Width = 180;
settings.SelectedIndex = 0;
settings.Properties.TextField = "Name";
settings.Properties.ValueField = "No";
settings.Properties.ValueType = typeof (string);
}).BindList(CeduleProduction.Repository.Concrete.WorkCenterRepository
.GetAll()).GetHtml()
<input type="submit" value="OK"/>}
Run Code Online (Sandbox Code Playgroud)
当我提交表单时,不使用valuefield,它是textfield,我需要更改以允许传递值(未显示)而不是显示的textfield
| 归档时间: |
|
| 查看次数: |
1573 次 |
| 最近记录: |