ExtJs Combobox绑值问题
1.后台返回传一个泛型集合List<xxx>
public ActionResult AddCarMsg()
{
List<Brand> brands = BrandManager.GetAllBrand();
ViewData["brands"] = Json(brands);
return View();
}
2.前台要把brands绑定到combobox上
非关键代码省略:
.............
var LeaveForm = new Ext.FormPanel({
width: 360,
frame: true,
renderTo: AddCarMsg,
title: "添加车辆信息",
bodyStyle: "padding:5px 5px 0",
id: "addCarForm",
items: [
{
xtype: "combo",
name: 'brand',
store: //这里应该如何绑定? fieldLabel: "品牌",
emptyText: '请选择品牌'
},
.............
请教