easyui-combobox默认值绑定

 

 1  $('#combox_role').combobox({
 2      panelHeight: 100,
 3      url: '../../Handler/GetComboxItems.ashx?type=0',
 4      valueField: 'RoleId',
 5      textField: 'RoleName',
 6      onLoadSuccess: function () {
 7          var oData = $(this).combobox('getData');
 8          for (var item in oData[0]) {
 9              if (item == "RoleId") {
10                  $(this).combobox("select", oData[0][item]);
11              }
12          }
13      }
14  });

 

还可以通过下面的方式绑定默认值

 

 

 

posted @ 2013-12-07 13:43  DoNetCoder  阅读(710)  评论(0编辑  收藏  举报