xiaobozhu 2015-10-27
var username = $("#form_username").val();
$('#tt').datagrid({
url:webContext+"/user/queryUserList.action",
width: 'auto',
height: 'auto',
nowrap:false,
iconCls:'icon-save',
striped:true,
pagination:true,
rownumbers:true,
pageNumber:1,
pageSize:10,
pageList:[5,10],
queryParams:{'username':username},
singleSelect:true,
loadMsg:'数据加载中......',
columns:[[
{field:'ck',checkbox:true},
{field:'username',title:'账号名',width:80,align:'left'},
{field:'id',title: '角色管理',align: 'left',width:80,
//添加超级链
formatter:function(value,rowData,rowIndex){
//function里面的三个参数代表当前字段值,当前行数据对象,行号(行号从0开始)
//alert(rowData.username);
return "<a href='javacript:;' onclick='mngRol();'>角色管理</a>";
}
}
]]
});