专注于.Net

享受编程的乐趣
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

Easyui combogrid添加toolbar

Posted on 2014-03-03 13:50  古道飘零客  阅读(1146)  评论(1编辑  收藏  举报

近一段时间一直在做Easyui的一个项目。官方的资料 API有些不全,把自己遇到的解决的问题发出来希望能帮助到大家。

combogrid这个控件绑定了一个DataGrid,API也没有说可以绑定ToolBar。不多说。。直接上代码
<select class="easyui-combogrid" style="width: 134px" name="txtDogCode" data-options=" required:true,
panelWidth: 430,
toolbar:'#toolbar',
idField: 'DogCode',
textField: 'DogCode',
url: 'DogInfo.ashx?action=GetDogStock',
pagination: true,//是否分页
rownumbers: true,//序号
pageSize: 10,//每页显示的记录条数,默认为10
pageList: [10],//可以设置每页记录条数的列表
method: 'post',
columns: [[
{ field: 'DogCode', title: '编号', width: 100, align: 'center' },
{ field: 'DogTypeName', title: '狗类型', width: 100, align: 'center' }
]],
fitColumns: true">