// 初始化右下角的提示框
$.messager.show({
title : '我的消息',
msg : '登录成功,欢迎使用此系统',
timeout : 3000,
showType : 'slide'
});
// 初始化datagrid
$("#centerDateGrid").datagrid({
url : 'login/users!findList.action',
height:"200px;",
iconCls : 'icon-save',// 图标
rownumbers : true,// 如果为true,则显示一个行号列。
singleSelect : true,// 如果为true,则只允许选择一行。
// autoRowHeight:false,//定义设置行的高度,根据该行的内容。设置为false可以提高负载性能。
nowrap : false,// 如果为true,则在同一行中显示数据。设置为true可以提高加载性能。
pagination : true,// 显示分页工具条
pageSize : 20,// 每页条数
fit : true,// datagrid自适应宽高
fitColumns : true,// 使列自动展开/收缩到合适的数据表格宽度。
idField : 'userId',
sortName : 'userId',// 定义哪些列可以进行排序
sortOrder : 'asc',// 定义列的排序顺序,只能是'asc'或'desc'
border : false,
pageList : [ 20, 30, 40, 50 ],// 分页条数选择
toolbar : [ {
text : '添加',
iconCls : 'icon-add',
hander : function() {
}
},'-', {
text : '修改',
iconCls : 'icon-edit',
hander : function() {
}
},'-', {
text : '删除',
iconCls : 'icon-remove',
hander : function() {
}
} ]
//toolbar:"#toolbar"
});
$.messager.show({
title : '我的消息',
msg : '登录成功,欢迎使用此系统',
timeout : 3000,
showType : 'slide'
});
// 初始化datagrid
$("#centerDateGrid").datagrid({
url : 'login/users!findList.action',
height:"200px;",
iconCls : 'icon-save',// 图标
rownumbers : true,// 如果为true,则显示一个行号列。
singleSelect : true,// 如果为true,则只允许选择一行。
// autoRowHeight:false,//定义设置行的高度,根据该行的内容。设置为false可以提高负载性能。
nowrap : false,// 如果为true,则在同一行中显示数据。设置为true可以提高加载性能。
pagination : true,// 显示分页工具条
pageSize : 20,// 每页条数
fit : true,// datagrid自适应宽高
fitColumns : true,// 使列自动展开/收缩到合适的数据表格宽度。
idField : 'userId',
sortName : 'userId',// 定义哪些列可以进行排序
sortOrder : 'asc',// 定义列的排序顺序,只能是'asc'或'desc'
border : false,
pageList : [ 20, 30, 40, 50 ],// 分页条数选择
toolbar : [ {
text : '添加',
iconCls : 'icon-add',
hander : function() {
}
},'-', {
text : '修改',
iconCls : 'icon-edit',
hander : function() {
}
},'-', {
text : '删除',
iconCls : 'icon-remove',
hander : function() {
}
} ]
//toolbar:"#toolbar"
});