Ok then,
As I generate my grid data from .NET (I wrote an object called GridProvider which is preparing data to the javascript) I'll try to put as much information from output as possible.
So, my colModelDetails (colModel) contains such rows:
{title:'Some title for string value', dataType: 'string', width:100,align:'right'}
{title:'Some title for float value', dataType: 'float', width:100,align:'right'}
and so on,
My arrayData is an array of:
[0, 'Some string value for column title', '290203.80', '327279.80', '378428.80', '428080.50', '88225.07', '30%'],
[1, 'Some string value for column title', '2902303.80', '327219.80', '37328.80', '422.50', '8822.07', '30%']
and so on.
Then my grid id generated this way:
var gridResizable = false;
var resultsPerPage = 15;
var obj = {
dataModel: {
data: arrayData,
sorting: "local",
},
colModel: colModelDetails,
title: "Grid title",
resizable: gridResizable,
flexHeight: true,
freezeCols: 1,
numberCell: { show: true },
editable: false,
selectionModel: { type: 'row' },
scrollModel: { autoFit: true },
//here I tried to "override" grouping as automatic summary with grouping works well (when I have some summary objects in colModel as in API)
//groupModel: {
// dataIndx: ["someCol"],
// collapsed: [false],
// title: ["Group title"],
// dir: ["up"]
// //,icon: ["circle-plus", "circle-triangle", "triangle"]
//},
pageModel: {
type: "local",
rPP: resultsPerPage,
strRpp: "",
strDisplay: " results from {0} to {1} of {2} all"
},
hwrap: false,
wrap:false,
};
var $summary = "";
obj.render = function (evt, ui) {
$summary = $('<div class="pq-grid-summary"></div>').prependTo($(".pq-grid-bottom", this));
var summaryData = calculateSummary(summaryDetails, arrayData);
var dataS = [summaryData];
alert(dataS.toSource());
//this alert gives me output (and this is the result od calculateSummary function, dont worry about incoming parameters, just note the output which is the result of summing all the dataArray fields I want to sum, the empty fields gives an empty break - just omits one column to put the sum under the proper one - this one was working very well in demo):
[["'<strong>Summary: </strong>'", "''", "'1 695 184,47'", "'1 936 894,21'", "'2 264 940,72'", "'2 595 945,96'", "''", "''"]]
var tbl = { data: dataS, $cont: $summary };
$("#gridDiv").pqGrid("createTable", tbl);
//this one I used to test Your API example:
//$("#" + gridDivElementId).pqGrid("createTable", {
// $cont: $("#genZestBtn"),
// data: [["Total", "5", "10"]]
//});
}
obj.rowSelect = function (evt, ui) {
var rowIndx = parseInt(ui.rowIndx)+1;
manageSelectedRow(ui.rowData, rowIndx); //function for selected row management - working properly
}
obj.refresh = function (evt, ui) {
//EMPTY BODY
}
var grid = $("#gridDiv").pqGrid(obj);