怎样设置easyui中datagrid行高

本文介绍使用 EasyUI 框架进行数据表格配置的方法,包括设置数据表格的标题、图标、URL、列宽等属性,并展示了如何通过 JavaScript 实现自定义样式。

$('#face_table2').datagrid({
            title: '信息',
            iconCls: 'icon-save',
   url: 'callroll!page.action'
   nowrap: true,                      //设置为true,当数据长度超出列宽时将会自动截取。
   striped: true,        //显示条纹
   pageList: [5,15,30], 
   fitColumns: false,
   pageSize: 15,
   loadMsg: '正在加载数据.......',  //当从远程站点载入数据时,显示的一条快捷信息
   pagination: true,                  //设置true将在数据表格底部显示分页工具栏
   idField: 'flowId',                    //表明该列是一个唯一列。
   rownumbers: true,               //设置为true将显示行数 ,
   singleSelect: true,                //设置为true将只允许选择一行
   columns:[[
           {field:'userNo',title:'编号',width:120,align:'center'},
           {field:'userName',title:'姓名',width:120,align:'center'}

         ]],
    onLoadSuccess: function(data){   
          var panel = $(this).datagrid('getPanel');   
          var tr = panel.find('div.datagrid-body tr');   
          tr.each(function(){   
              var td = $(this).children('td[field="userNo"]');   
              td.children("div").css({   
                  //"text-align": "right" 
                  "height": "28px" 
              });   
          });   
      }
   })

转载于:https://www.cnblogs.com/liuqiyun/p/8628776.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值