Easyui Datagrid 根据参数设定样式

来源:互联网 发布:域名污染查询 编辑:程序博客网 时间:2024/05/22 00:39

jsp:

      <table id="tableId" class="easyui-datagrid"
style="width: 920px; height: 500px"
data-options="rownumbers:true,singleSelect:true,method:'get'">
<thead>
<tr>
        <th data-options="field:'field1',hidden:true">项目名称</th>
<th data-options="field:'field2',width:100,align:'center'">区域</th>
<th data-options="field:'field3',width:500,align:'center'">医院名称</th>
</tr>
</thead>
</table>


在JSP中script:


         <script>
$(function(){
$('#myProjectListTable').datagrid({
rowStyler:function(index,row){
if (row.uploadStatus == '否'){
return 'background-color:pink;color:blue;font-weight:bold;';
}
}
});
});
</script>

原创粉丝点击