【php增刪改查實例】第七節 - 部門管理模塊(畫一個datagrid表格)
阿新 • • 發佈:2018-05-18
datagrid 數據庫 ali etime enter numbers center creat 哪些
在easyui中,datagrid組件需要用一個table標簽去渲染。
<table id="grid0" title="部門管理" class="easyui-datagrid" fitColumns="true" pagination="true" rownumbers="true" url="query.php"> <thead> <tr> <th field="cb" checkbox="true" align="center"></th> <th field="id" width="30" align="center">ID</th> <th field="deptid" width="80" align="center">部門編號</th> <th field="deptname" width="120" align="center">部門名稱</th> <th field="createtime" width="180" align="center">創建時間</th> <th field="updatetime" width="180" align="center">最後更新時間</th> </tr> </thead> </table>
PS: 在easyui的表格組件中,我們唯一要關心的就是
1.提交到什麽地址: url
2.顯示哪些字段。
<th field="id" width="30" align="center">ID</th>
比如,ID字段,你需要在th中設置一個field屬性,然後這個屬性的值最好和數據庫的那一張表的字段名保持一致!
【php增刪改查實例】第七節 - 部門管理模塊(畫一個datagrid表格)