日期:2014-05-16 浏览次数:20428 次
$('#progressTable').datagrid({
border : false,
singleSelect : false,
loadMsg : '请稍候......',
nowrap : false,
striped : true,
collapsible : true,
url : null,
idField : 'id',
remoteSort : false,
columns : [ [
{field : 'id',title : '', width : 10,hidden:true},
{field : 'resourseName',title : '资源名称', width : 180},
{field : 'resourseStatus',title : '资源状态', width : 80,
formatter:function(value,rowData,rowIndex){
var div = '<div id="status'+rowData.id+'">'+value+'</div>';
return div;
}
},
{field : 'resourseProgressBar',title : '进度条', width : 200,formatter:function(value,rowData,rowIndex){
var div = '<div style="width: 100%;height:40px;float:left;" >'+
'<div style="float:left;margin-top:4px;border:0px solid red;width: 205px;height: 20px;background:url(images/ind_progress_bg.png)">'+
'<div id="progress'+rowData.id+'" style="margin-left:4px;margin-top:3px;background:url(images/ind_progress.png) repeat-x;width:'+ value +';height:14px;"></div>'+
'</div>'+
'</div>';
return div;
}},
{field : 'resourseProgress',title : '进度', width : 30,formatter:function(value,rowData,rowIndex){
var div = '<div id="percent'+rowData.id+'">'+value+'%</div>';
return div;
}},
{field : 'resourseDes',title : '描述', width : 180,formatter:function(value,rowData,rowIndex){
var div = '<div id="meg'+rowData.id+'" style="color:red;">'+value+'</div>';
return div;
}}
] ],
pagination : false,
rownumbers : false,
fitColumns: true,
onBeforeLoad:function(){
},
onLoadSuccess : function() {
//如何阻止该事件?????????????????
},
onSelect : function(rowIndex, rowData) {
},
onUnselect: function(rowIndex, rowData) {
}
});