Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Duplicate rows appear if npage protocol extension is used
29/08/2011
18:09
Avatar
kobruleht
Member
Members
Forum Posts: 144
Member Since:
05/05/2011
sp_UserOfflineSmall Offline

npage protocol extension is used in jqgrid virtual scroll mode:

    jQuery.extend(jQuery.jgrid.defaults, {
                datatype: "json",
                mtype: 'POST',
                scroll: 1,
                viewrecords: true,
                rowNum: 80,
                multiselect: true,
                multiboxonly: true,
                scrollrows: true,
                prmNames: { npage: "_npage",
                id: "_rowid", page: "_page", rows: "_rows", oper: "_oper", sort: "_sidx", order: "_sord" },
                autoencode: true,
                gridview: true,
                toppager: true,
            serializeGridData: function (postData) {
                var myPostData = $.extend({}, postData);
                myPostData._filters = myPostData.filters;
                delete myPostData._oper;
                delete myPostData.filters;
                delete myPostData.searchField;
                delete myPostData.searchString;
                delete myPostData.searchOper;
                return myPostData;
            }
            });

If ctrl+end is pressed, last to pages are retrieved:

    _search=false&nd=1314629335794&_rows=80&_page=128&_sidx=&_sord=asc&_npage=2

Response:

    {"total":129,"page":128,"records":10252,"rows":[{"id":"_DCl_5C_3Cdine",
    "cell":[null,"Ül\\\u003cdine",....
    ...
    ]}

If Ctlr+end is pressed again , last page is requested from server again:

    _search=false&nd=1314629340826&_rows=80&_page=129&_sidx=&_sord=asc

Response:

    {"total":129,"page":129,"records":10252,
    "rows":[{"id":"some_idtext_20"cell":[null,"xxxxxxxxxxxxx"
    .......
    ]}

Last page is displayed in the top of grid, its rows appear twice in jqGrid.

How to show grid properly if npage is used ?
If npage parameter is removed, data appears properly.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
39 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information