Skip to content

Can jqgrid sends totalrows after the first pulling data? #510

@hyfbeetle

Description

@hyfbeetle

image
I want to use it on the next page action.
Simple modify, Added "if (pN.totalrows !== null) { prm[pN.totalrows] = p.records; }", is it any problem? thanks very much!

			populate = function (npage) {
				var self = this, $self = $(self), gridSelf = self.grid;
				if (!gridSelf.hDiv.loading) {
					var pvis = p.scroll && npage === false, prm = {}, dt, dstr, pN = p.prmNames;
					if (p.page <= 0) { p.page = Math.min(1, p.lastpage); }
					if (pN.search !== null) { prm[pN.search] = p.search; }
					if (pN.nd !== null) { prm[pN.nd] = new Date().getTime(); }
					if (isNaN(parseInt(p.rowNum, 10)) || parseInt(p.rowNum, 10) <= 0) { p.rowNum = p.maxRowNum; }
					if (pN.rows !== null) { prm[pN.rows] = p.rowNum; }
					if (pN.page !== null) { prm[pN.page] = p.page; }
					if (pN.sort !== null) { prm[pN.sort] = p.sortname; }
					if (pN.order !== null) { prm[pN.order] = p.sortorder; }
					if (p.rowTotal !== null && pN.totalrows !== null) { prm[pN.totalrows] = p.rowTotal; }
					if (pN.totalrows !== null) { prm[pN.totalrows] = p.records; }
					var lcf = isFunction(p.loadComplete), lc = lcf ? p.loadComplete : null;
					var adjust = 0;
					npage = npage || 1;
					if (npage > 1) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions