首页 > 代码库 > 浅谈datagrid详细操作单元格样式

浅谈datagrid详细操作单元格样式

    $(‘#tt‘).datagrid({           url: ‘datagrid_data2.json‘,           title: ‘DataGrid - ContextMenu‘,           width: 700,           height: ‘auto‘,           fitColumns: true,           columns: [[               {field: ‘itemid‘,title: ‘Item ID‘,width: 80},               {field: ‘productid‘,title: ‘Product ID‘,width: 120},                {field: ‘listprice‘,title: ‘List Price‘,width: 80,align: ‘right‘},                {field: ‘unitcost‘,title: ‘Unit Cost‘,width: 80,align: ‘center‘},                {field: ‘attr1‘,title: ‘Attribute‘,width: 250},                {field: ‘status‘,title: ‘Status‘,width: 60,align: ‘center‘}           ]],           onl oadSuccess: function(data){               var panel = $(this).datagrid(‘getPanel‘);               var tr = panel.find(‘div.datagrid-body tr‘);               tr.each(function(){                   var td = $(this).children(‘td[field="unitcost"]‘);                   td.children("div").css({                       "text-align": "right"                  });                   ;               });           }       });  

浅谈datagrid详细操作单元格样式http://www.easyui.info/archives/470.html

浅谈datagrid详细操作单元格样式