jQGrid的使用记录.
来源:互联网 发布:自组织神经网络算法 编辑:程序博客网 时间:2024/06/05 07:55
jqGrid使用总结:实现的是斑马线格式,根据条件判断下载按钮是否显示. 后台传过来的是json字符串.
使用bootstrap的jqGrid,
$(document).ready(function () {
//从页面获取的数据
var gridWidth = $(".main-content").width();
var portals_Id = document.getElementById('portals_Id').value;var selectedForm = document.getElementById('selectedPortal').value;
$("#portaljqGrid").jqGrid({
url: 'findPortalsByGid',
datatype: "json",
mtype:"post",
postData:{portals_Id,selectedForm},
colNames: ["","","代码", "名称", "是否活动","所属门户组","门户来源","操作"],//列标题
colModel: [
{ name: 'id',
index: 'id',
key: true,
sorttype: "long",
editable: true,
search: false,
hidden: true,
hidedlg: true
},
{ name: 'portalsId',
index: 'portalsId',
sorttype: "long",
editable: true,
search: false,
hidden: true,
hidedlg: true
},
{ name: "code",
ndex: "code",
width: 0.1 * gridWidth,
editable: true,
align: "center",
editoptions: {
size: "20",
maxlength: "30"
}
},
{ name: "name",
index: "name",
width: 0.1 * gridWidth,
editable: true,
editoptions: {
size: "20",
maxlength: "30"
}
},
{ name: "setNoActive",
index: "setNoActive",
width: 0.1 * gridWidth,
editable: true,
editoptions: {
size: "20",
maxlength: "30"
}
},
{ name: "portalGroupCode",
index: "portalGroupCode",
width: 0.1 * gridWidth,
editable: true,
editoptions: {
size: "20",
maxlength: "30"
}
},
{ name: "designerVersion",
index: "designerVersion",
width: 0.1 * gridWidth,
editable: true,
editoptions: {
size: "20",
maxlength: "30"
}
},
{ name: 'portalsId',
width: 0.15 * gridWidth,
formatter: function(value, options, row){
debugger;
var operations = "<a href='javascript:void(0)' onclick=\"prop('"+options.rowId+"')\"><i class='fa fa-search'></i> 属性  </a>"
+ "<a href='getTree?portalId="+options.rowId+"'><i class='fa fa-eye'></i> 查看树  </a>"
+ "<a href='getRelevanceUser?portalId="+options.rowId+"'><i class='fa fa-eye'></i> 查看关联用户  </a>";
if(row.designerVersion == "条件1"){
operations = operations +"<a href='portalDownLoad.do?portalId="+options.rowId+"'><i class='fa fa-download'></i> 下载</a>";
}
return operations;
}},
],
viewrecords: true,
height: 480,
rowNum: 10,
rowList : [10,30,50],
rownumbers: true,
rownumWidth: 25,
autowidth:true,
multiselect: true,
altRows: true,
multiboxonly: true,
pager: "#portaljqGridPager",
loadComplete : function() {
var table = this;
setTimeout(function() {
updatePagerIcons(table);
}, 0);
},
gridComplete:function(){
//隐藏grid底部滚动条
$("#portaljqGrid").closest(".ui-jqgrid-bdiv").css({ "overflow-x" : "hidden" });
}
});
});
阅读全文
0 0
- jQGrid的使用记录.
- JqGrid使用记录
- jqGrid使用记录
- jqGrid使用记录
- jqGrid使用记录总结
- jqgrid使用记录
- jqGrid 使用知识点记录
- 关于jqgrid使用记录
- jqgrid总结,使用过程中的一些配置信息的记录
- jqGrid的使用
- jqGrid的使用
- Jqgrid的使用
- Jqgrid 的简单使用
- jqgrid的使用
- jqgrid 的使用
- jqGrid中事件的使用
- 最近使用jqGrid的场景
- 项目中使用的jqGrid
- 【Java并发】- ReentrantLock,重入锁
- 欢迎使用CSDN-markdown编辑器
- finereport note 帆软笔记
- scatter file 全功能介绍
- java多线程之多生产者与多消费者案例之Lock和Condition实现方式
- jQGrid的使用记录.
- 1058. 选择题(20) PAT
- js二维数组定义和初始化的三种方法
- 【git】fatal: unable to access 'https://github.com/top-think/framework.git/'
- 排序问题
- Android对图片进行高斯模糊
- 鱼眼图片转化位全景图片的软件以及鱼眼矫正方法
- php删除多维数组里面的值
- java.util.Stack源码解析