标签:easyui dategrid formmater field子属性
dategrid:
<body class="easyui-layout" data-options="fit:true,border:false"> <table id="dg" class="easyui-datagrid" data-options="fit:true,border:false" url="book/listBookForUser" toolbar="#toolbar" pagination="true" rownumbers="true" fitColumns="true" singleSelect="true"> <thead> <tr> <th field="bookId" width="50">书ID</th> <th field="bookName" width="50">书名</th> <th field="bookType" width="50" formatter="formatBookType">书类型</th> <th field="author" width="50">作者</th> <th field="callNumber" width="50">索书号</th> <th field="iSBN" width="50">ISBN</th> <th field="publisher" width="50">出版社</th> <th field="publishYear" width="50">出版年份</th> <th field="series" width="50">系列</th> <th field="language" width="50">语言</th> <th field="price" width="50">价格</th> <th field="page" width="50">页数</th> </tr> </thead> </table>
function formatBookType(val,row,index){ //alert(row.bookType); if(val==null){ return ""; }else return row.bookType.bookTypeName; }
easyUI dategrid field 用formatter显示子属性
标签:easyui dategrid formmater field子属性
原文地址:http://blog.csdn.net/yang362046076/article/details/44816159