首页 > 代码库 > datagrid 显示隐藏 工具栏按钮

datagrid 显示隐藏 工具栏按钮

 

 


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

........

........


, onl oadSuccess: 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(); } } ] }); }

 

datagrid 显示隐藏 工具栏按钮