{
iconCls: 'icon-help',
text : '搜索:',
handler: function(){
//
}
}
不会很复杂,直接在text里面返回一个input标签就好了
最终效果如图:
在html中可以这样写,加上datagrid-toolbar的样式即可
js 中添加 直接在定义datagrid 的时候加上 toolbar 属性
toolbar: ["-", {
id: '',
text: '',
iconCls: '',
handler: function () {}
}, "-", {
id: '',
text: '',
iconCls: '',
handler: function () { }
}, "-", {
id: '',
text: '',
iconCls: '',
handler: function () { }
}, "-"]
第二种方法是在页面些个div 在里面可以放入 按钮 输入框 搜索框 之类的 并且给这个div 设置一个 id 然后再定义 datagrid 的地方写 toolbar:"#div的id"