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

posted on 2014-12-09 10:55  何石-博客  阅读(11278)  评论(0编辑  收藏  举报