Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hyfbeetle opened this issue Dec 11, 2022 · 0 comments
Open

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

hyfbeetle opened this issue Dec 11, 2022 · 0 comments

Comments

@hyfbeetle
Copy link

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) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant