LigerUi中Grid控件的自定义工具条设置(示例)

梦为马

关注

阅读 46

2022-05-24


// 设置内容

var toolbarOptions = {
items: [
{ text: '增加', click: itemclick, img: "../lib/icons/32X32/order_192.gif" },
{ line: true },

{ text: '删除', id: 'clearbtns', click: itemclick, img: "../lib/icons/32X32/attibutes.gif" }


]
};


// 工具条事件

//工具条事件
function itemclick(item) {
switch (item.text) {
case "增加":
var selected = grid.getSelected();
if (!selected) { LG.tip('请选择行!'); return }
break;
case "查看":
var selected = grid.getSelected();
if (!selected) { LG.tip('请选择行!'); return }
top.f_addTab(null, '查看', 'watch.aspx?No=1'); // 增加新标签,并打开新页
break;

}
}







精彩评论(0)

0 0 举报