1. 程式人生 > >easyui擴充套件datagrid列隱藏選單,升序降序以及過濾顯示

easyui擴充套件datagrid列隱藏選單,升序降序以及過濾顯示

效果圖:滑鼠右擊表頭可選擇隱藏或顯示列資訊,升序降序以及過濾顯示

引入js外掛即可使用了哦:

<!-- datagrid-隱藏列選單的支援 -->
<link href="http://www.easyui-extlib.com/Content/Site.css" rel="stylesheet" />
<link href="http://www.easyui-extlib.com/Content/icons/icon-standard.css" rel="stylesheet" />
<link href="http://www.easyui-extlib.com/Scripts/jquery-easyui-extensions/datagrid/jeasyui.extensions.datagrid.css" rel="stylesheet" />
<script src="http://www.easyui-extlib.com/Scripts/jquery-easyui-extensions/menu/jeasyui.extensions.menu.js"></script>
<script src="http://www.easyui-extlib.com//Scripts/jquery-easyui-extensions/datagrid/jeasyui.extensions.datagrid.getColumnInfo.js"></script>
<script src="http://www.easyui-extlib.com/Scripts/jquery-easyui-extensions/datagrid/jeasyui.extensions.datagrid.columnToggle.js"></script>

溫馨小提示:如果想要實現點選名稱旁邊的小圖示就進行升序和降序,那麼在表頭的data-options里加 sortable:'true' 屬性即可實現哦~~