//当查询IT基础设施的时候隐藏'STAFF_ID'、'ITSM_STAFF_ID' if($("input[name='currentstate']").val()==2){ $('#ordertable').datagrid('hideColumn','STAFF_ID'); $('#ordertable').datagrid('hideColumn','ITSM_STAFF_ID');
}else{ $('#ordertable').datagrid('showColumn','STAFF_ID'); $('#ordertable').datagrid('showColumn','ITSM_STAFF_ID');
} // 清空选中行 SERVICEDATAGRID.datagrid('clearSelections');
$('#ordertable').datagrid('hideColumn','列field');//隐藏列
把hideColumn换成showColumn 即为显示列