关于rowStyler 用法

提问 未结 5 16838
悬赏:20飞吻
@易网时代 , 您好,下面grid的rowStylers 设置无效呀,谢谢。
$('#table').iDatagrid({
url:'/webapi/role/list',
contentType: 'application/json; charset=UTF-8',
method:'post',
loadMsg:'正在加载数据。。。',
queryParams:{Authorization:parent.Authorization,"organid":organid},
columns:[[
{field:'id',title:'主键',width:100,checkbox:true},
{field:'code',title:'序号',width:300,sortable:true},
{field:'name',title:'角色名称',width:300,sortable:true},
{field:'roletype',title:'角色类型',width:300,sortable:true,rowStyler: function(index,row){
var operateHtml = '';
if(row.roletype==0)
operateHtml='管理人员';
else if(row.roletype==1)
operateHtml='操作人员';
else if(row.roletype==2)
operateHtml='普通人员';
return operateHtml;
}},
{field:'remark',title:'备注',width:300,sortable:true}
]]
});
回帖
回帖须知