$(function(){
$('#dg').datagrid({
title:"投票列表",
url:'dept.action', //远程请求数据的url路径
pagination:true, //显示底部分页栏
pageSize:15, //默认每页记录数
pageList:[5,10,15], //显示列表记录数的下拉框选项
columns:[[
{field:'ck',checkbox:true},
{field:'deptno',title:'投票标题',width:408
},
{field:'dname',title:'备选项数',width:60,align:'center',sortable:true},
{field:'loc',title:'参与人数' ,styler:myStyler}
]],
width:500,
height:500,
singleSelect:false,
rownumbers:false,
/* iconCls: 'icon-search', */
fitColumns:true,//自适应宽度,防止水平滚动
striped:true,//隔行变色
loadMsg:"正努力为您加载中......"
});
});
$('#dg').datagrid({
title:"投票列表",
url:'dept.action', //远程请求数据的url路径
pagination:true, //显示底部分页栏
pageSize:15, //默认每页记录数
pageList:[5,10,15], //显示列表记录数的下拉框选项
columns:[[
{field:'ck',checkbox:true},
{field:'deptno',title:'投票标题',width:408
,
rowspan:2,
align:
'center'
,
formatter:
function
(value,row,index){
if
(value==
'1'
){
return
'A'
}
else
if
(value==
'2'
){
return
'B'
}
}
{field:'dname',title:'备选项数',width:60,align:'center',sortable:true},
{field:'loc',title:'参与人数' ,styler:myStyler}
]],
width:500,
height:500,
singleSelect:false,
rownumbers:false,
/* iconCls: 'icon-search', */
fitColumns:true,//自适应宽度,防止水平滚动
striped:true,//隔行变色
loadMsg:"正努力为您加载中......"
});
});