I have used your demo at
https://paramquery.com/pro/demos/group_rowsThe display of initV, finalV and total number of rows is shown in the grid title bar
I have enabled numberCell.
I am surprised that initially it shows 1 to 17 of 940 rows when what I actually see is only 1 to 13.
If I were to move the scroll to the top, it shows 1 to 15 of 940 rows which is not the actual rows I see.
I am using Google Chrome Version 61.0.3163.100 (Official Build) (64-bit) on Windows 10.
Also when I click on the scrollbar below the scroller - to get the next "page"
The title now shows 13 to 27 rows when what I actually see is only 13 to 25 rows.
Looks like there is a discrepancy here.
I have attached an image but the stipulation of less than 100 kB - I had to crop the image of the grid
$(function () {
var numDataRecords;
var gridTitle = "Order Details";
var gridDiv = "#grid_group_rows";
function fillOptions(grid) {
var column = grid.getColumn({ dataIndx: 'ShipCountry' });
column.filter.options = grid.getData({ dataIndx: ['ShipCountry'] });
column.filter.cache = null;
grid.refreshHeader();
}
var colM = [
{ title: "ShipCountry", width: 120, dataIndx: "ShipCountry",
filter: {
type: 'select',
prepend: { '': 'All Countries' },
valueIndx: 'ShipCountry',
labelIndx: 'ShipCountry',
condition: 'equal',
listeners: ['change']
}
},
{ title: "Customer Name", width: 130, dataIndx: "ContactName" },
{ title: "Freight", width: 120, format: '$##,###.00',
summary: {
type: "sum"
},
dataType: "float", dataIndx: "Freight"
},
{ title: "Shipping Via", width: 130, dataIndx: "ShipVia" },
{ title: "Shipped Date", width: 100, dataIndx: "ShippedDate", dataType: "date" },
{ title: "Shipping Address", width: 220, dataIndx: "ShipAddress" },
{ title: "Shipping City", width: 130, dataIndx: "ShipCity" }
];
var dataModel = {
location: "remote",
dataType: "JSON",
method: "GET",
url: "/Content/orders.json"
//url: "/pro/orders/get",//for ASP.NET
//url: "orders.php",//for PHP
};
var groupModel = {
on: true,
summaryInTitleRow: 'all', //to display summary in the title row.
dataIndx: ['ShipCountry', 'ContactName'],
//showSummary: [true], //to display summary at end of every group.
title: [
"{0} ({1})",
"{0} - {1}"
]
};
var obj = {
height: 500,
toolbar: {
items: [{
type: 'button',
label: "Toggle grouping",
listener: function () {
this.Group().option({
on: !this.option('groupModel.on')
});
}
}]
},
dataModel: dataModel,
scrollModel: { autoFit: true },
colModel: colM,
numberCell: { show: true },
filterModel: { on: true, header: true, type: "local" },
selectionModel: { type: 'cell' },
groupModel: groupModel,
load: function (evt, ui) {
//options for ShipCountry filter.
fillOptions(this);
},
load: function( event, ui ) {
var data = this.options.dataModel.data;
numDataRecords = data.length
var title = gridTitle + " - " + numDataRecords + " records";
$(gridDiv).pqGrid( "option", "title", title );
},
beforeTableView: function( event, ui ) {
var initV = ui.initV + 1;
var finalV = ui.finalV + 1;
var numDataRows = (ui.pageData) ? ui.pageData.length : 0;
var title = gridTitle + " - " + initV + " to " + finalV + " of " + numDataRows + " rows";
$(gridDiv).pqGrid( "option", "title", title );
},
showTitle: true,
resizable: true,
virtualX: true,
virtualY: true,
hwrap: false,
wrap: false
};
pq.grid("#grid_group_rows", obj);
});