首页 > 代码库 > easyui datagrid 页面详细使用
easyui datagrid 页面详细使用
//加载数据workflowName
onl oadmyCgxList: function (id) {
if (id != null && id != "" && typeof (id) != "undefined") {
var param = {
"ID": id
}
$("#myCgxList").datagrid(‘load‘, param);
}
},
//草稿箱
myCgxList: function () {
var url = ""; //初始url
// if (id != null && id != "") {
url = "../AddWorkFlow/getCGXList";
// }
QueryParam = {}; //提交参数
$("#myCgxList").datagrid({
url: url,
nowrap: false, //是否换行,True 就会把数据显示在一行里
striped: true,
pageSize: 5,
pageList: [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 100, 200, 500, 1000],
queryParams: QueryParam,
fitcolumns: true,
onDblClickRow: function (index, RowData) {
}, //用户单击一行时触发的事件
columns: [[
// { field: ‘ck‘, width: 30, checkbox: true }, 10 20 50 10 20
// { field: ‘ID‘, width: 30, hidden: true },
{field: ‘SEQUENCE‘, title: ‘流水号‘, width: 10, align: ‘center‘, halign: ‘center‘ },
{ field: ‘FORMNAME‘, title: ‘对应表单‘, width: 20, align: ‘center‘, halign: ‘center‘ },
{ field: ‘NAME‘, title: ‘公文名称‘, width: 50, align: ‘center‘, halign: ‘center‘ },
{ field: ‘Number‘, title: ‘公文流水号‘, hidden: true },
{ field: ‘FQREALNAME‘, title: ‘发起人‘, width: 10, align: ‘center‘, halign: ‘center‘ },
{ field: ‘ck‘, title: ‘相关操作‘, width: 20, align: ‘left‘, halign: ‘left‘,
formatter: function (value, RowData) {
return ‘<a href="http://www.mamicode.com/#" style="text-decoration:none" onclick="myAddWorkFlow.GOONNewWorkClick(\‘‘ + RowData.ID + ‘\‘, \‘‘ + RowData.FLOWNUMBER + ‘\‘, \‘‘ + RowData.Number + ‘\‘)" >继续工作 </a> <a href="http://www.mamicode.com/#" style="text-decoration:none" onclick="myAddWorkFlow.deleteForAddFlowWorkCG(\‘‘ + RowData.ID + ‘\‘ )" >删除</a> ‘;
}
}
]]
});
},