我有控制器的操作方法顯示「選擇」默認情況下,下拉列表MVC
public ActionResult _SelectCustomerRole()
{
var categories =_customerService.GetAllCustomerRolesByClientId(_workContext.CurrentClient.Id, true);
return new JsonResult { Data = new SelectList(categories.ToList(), "Id", "Name") };
}
我想顯示「選擇」默認情況下,在Telerik的文本降下來..
我的觀點是
@(Html.Telerik().ComboBox()
.Name("CustomerRoleNames")
.DataBinding(bindings => bindings.Ajax().Select("_SelectCustomerRole", "Security"))
.ClientEvents(x => x.OnChange("customerRole_OnChange"))
)
查看SelectList的重載 – devqon 2014-10-17 07:24:22