您的位置:首页 > 其它

datagrid 显示隐藏 工具栏按钮

2017-05-15 11:00 204 查看

function loadData(pars, url) {
$('#data').datagrid({
url: url,

........

........

, onLoadSuccess: function (data) {

if (comBoxName1 == "1" || comBoxName1=="2") {
$('#btnID').hide();
}
else {
$('#btnID').show();
}

}

, toolbar: [

{ text: '新增', id: 'btnID', name: 'add', iconCls: 'icon-add btn_menu', handler: function () { showAdd('@BaseRes.SPD_COL_013', comBoxName1); } }, '-',

{
text: '修改', id: 'edt', name: 'edt', iconCls: 'icon-edit', handler: function () {
var selectRows = $('#data').datagrid('getSelected');
if (!selectRows) {
$.messager.alert('@BaseRes.COM_CTL_NOTICE', "@BaseRes.MGC_CTL_031");
return;

}
Edit(selectRows.ID, "修改", true);

}

}, '-',
{ text: '删除', iconCls: 'icon-remove', handler: function () { DeletCombox(); } }

]
});
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: