1. 程式人生 > >怎樣設置easyui中datagrid行高

怎樣設置easyui中datagrid行高

工具欄 ... get gin tle 行高 AC ane 表格

$(‘#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"
});
});
}
})

怎樣設置easyui中datagrid行高