function show(ID) {
TypeID = ID;
var columns = [[//列表中展示的列
{field: 'RptID', title: "报表ID", width: 220, sortable: true, fitColumns: true },
{ field: 'CreateTime', title: "日期", width: 220, fitColumns: true, sortable: true },
{ field: 'RptName', title: "报表名称", width: 220, fitColumns: true, sortable: true, formatter: function (value, rowData, rowIndex) { return Turn(rowData.RptID, rowData.RptName) } },
{
field: 'action', title: '操作', width: 120, fitColumns: true, align: 'center',
formatter: function (value, rowData, rowIndex) {
var e = "";
e = '<a href="Edit.aspx?RptID=' + rowData.RptID + "\">" + '编辑</a>';
return e;
}
}
]];
var pms = {
sortName: "",
sortOrder: "",
RptTypeID: ID,
txtAutoSearch: $.trim(encodeURI($("#txtAutoSearch").val())),
txtRptName: $.trim($("#txtRptName").val()),
BulidTime1: $("#txtCreateDate1").val(),
BulidTime2: $("#txtCreateDate2").val()
};
loaddata('tt', 'DataJson1.ashx', pms, true, true, columns, pageindex, pagesize);
TypeID = ID;
var columns = [[//列表中展示的列
{field: 'RptID', title: "报表ID", width: 220, sortable: true, fitColumns: true },
{ field: 'CreateTime', title: "日期", width: 220, fitColumns: true, sortable: true },
{ field: 'RptName', title: "报表名称", width: 220, fitColumns: true, sortable: true, formatter: function (value, rowData, rowIndex) { return Turn(rowData.RptID, rowData.RptName) } },
{
field: 'action', title: '操作', width: 120, fitColumns: true, align: 'center',
formatter: function (value, rowData, rowIndex) {
var e = "";
e = '<a href="Edit.aspx?RptID=' + rowData.RptID + "\">" + '编辑</a>';
return e;
}
}
]];
var pms = {
sortName: "",
sortOrder: "",
RptTypeID: ID,
txtAutoSearch: $.trim(encodeURI($("#txtAutoSearch").val())),
txtRptName: $.trim($("#txtRptName").val()),
BulidTime1: $("#txtCreateDate1").val(),
BulidTime2: $("#txtCreateDate2").val()
};
loaddata('tt', 'DataJson1.ashx', pms, true, true, columns, pageindex, pagesize);
}
开始做的时候,表头与下面的数据错位,搞了好久,最后发现是返回数据的格式有问题,