一、datagrid 行變色:css
<#--html--> <div id="datagrid1" class="mini-datagrid" style="width:700px;height:250px;" url="../data/AjaxService.do" onload="colorFmt"> <div property="columns"> <div type="indexcolumn"></div> <div field="loginname" width="120" headerAlign="center" allowSort="true">員工賬號</div> <div field="name" width="120" headerAlign="center" allowSort="true">姓名</div> </div> </div> <#--css--> <style> .test{ color: red; } </style> <#--js--> <script> function colorFmt(e) { mini.parse(); var grid = mini.get("datagrid1"); var rows=e.data; $.each(rows,function (index,row) { if (row.name){ grid .addRowCls(grid .getRow(index),'test') } }); } </script>
二、 樹形分頁表格PagerTreehtml
pagerTree會根據返回值追加屬性假裝成樹,展開或收縮即爲一次查詢數據庫
2.一、數據源形式(pid不可少,若數據庫中無pid,可根據實際狀況在Controller層設置pid):flex
2.二、html頁面代碼:url
2.三、js代碼:code
2.四、頁面效果:htm
三、多個文本框並列一行blog
<div class="flex-layout">
效果:ip