if(true) { $('#dataGrid').datagrid('showColumn', '列名');}else { $('#dataGrid').datagrid('hideColumn', '列名');}