在easyui datagrid中每一行后面加一个easyui switch button按钮

求指导
2025-02-02 22:40:36
推荐回答(1个)
回答1:

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"