Hi Sir:
The part of the code is as below:
function LoadGridWithSummary(obj_ID, url, colM, sort, PageSize, topVisible, summaryData) {
GetRowIndex = -1;
var dataModel = {
location: "remote",
sorting: "remote",
paging: "remote",
dataType: "JSON",
method: "GET",
curPage: 1,
rPP: PageSize,
sortIndx: 0,
sortDir: "up",
rPPOptions: [20, 30, 40, 50, 100, 500, 1000],
getUrl: function () {
var orderField = (this.sortIndx == "0") ? "" : sort[this.sortIndx];
var sortDir = (this.sortDir == "up") ? "desc" : "asc";
if (this.curPage == 0) {
this.curPage = 1;
}
return {
url: url,
data: "pqGrid_PageIndex=" + this.curPage + "&pqGrid_PageSize=" +
this.rPP + "&pqGrid_OrderField=" + orderField + "&pqGrid_OrderType=" + sortDir + "&pqGrid_Sort=" + escape(sort)
};
},
getData: function (dataJSON) {
if (dataJSON == null && dataJSON.totalRecords <= 0) {
showTipsMsg("No Data!", 5000, 5);
}
return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: dataJSON.data };
}
};
if (!IsNullOrEmpty(topVisible)) {
topVisible = false;
}
var $summary = "";
$(obj_ID).pqGrid({
dataModel: dataModel,
colModel: colM,
editable: false,
topVisible: topVisible,
oddRowsHighlight: false,
columnBorders: true,
freezeCols: 0,
rowSelect: function (evt, ui) {
GetRowIndex = ui.rowIndxPage;
},
render: function (evt, ui) {
$summary = $("<div class='pq-grid-summary' ></div>").prependTo($(".pq-grid-bottom", this));
},
cellSave: function (ui) {
//$(obj_ID).refresh();
},
refresh: function (evt, ui) {
//var data = [summaryData, ["Second row for testing", "row", "for", "testing"]]; //2 dimensional array.
var data = [summaryData]; //2 dimensional array
var obj = { data: data, $cont: $summary };
$(obj_ID).pqGrid("createTable", obj);
}
});
$(obj_ID).pqGrid('refresh');
pqGridResize(obj_ID, -52, -4);
}
When Incoming the parameter of summaryData ,the summary row was not changed!
why?
Thanks!
BigMark