extjs grid行插入进度条
转载自http://joyliu.org/blog/archives/175
主要代码:
columns:
1 { 2 xtype: 'gridcolumn', 3 width: 110, 4 dataIndex: 'chScore', 5 text: '进度', 6 renderer: function (value, metaData, record) { 7 var id = Ext.id(); 8 metaData.tdAttr = 'data-qtip="'+value+'%"'; 9 Ext.defer(function () { 10 Ext.widget('progressbar', { 11 renderTo: id, 12 value: value / 100, 13 height:20, 14 width: 100, 15 text:value+'%' 16 }); 17 }, 50); 18 return Ext.String.format('<div id="{0}"></div>', id); 19 } 20 }
效果: