码迷,mamicode.com
首页 > 其他好文 > 详细

datagrid 显示隐藏 工具栏按钮

时间:2017-05-15 11:12:57      阅读:256      评论:0      收藏:0      [点我收藏+]

标签:name   get   div   edit   not   ide   tool   ext   com   

 

 


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(); } } ] }); }

 

datagrid 显示隐藏 工具栏按钮

标签:name   get   div   edit   not   ide   tool   ext   com   

原文地址:http://www.cnblogs.com/lhlong/p/6855479.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!