Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






gridReload and virtual scolling

No Tags
UserPost

01:33
23/05/2012


jstier

New Member

posts 1

Hi,


I have a created a jqgrid that looks something like this


    $("#jsonmap").jqGrid({       
        url:'./getdata.html?sessionId='+top.amApp.sessionId,
        datatype: "json",
        jsonReader: {
            repeatitems : false
        },
        colNames:['id', 'state', 'ack', 'prio', 'Datum/Zeit','LMA', '?', 'HE', 'SHS', 'Klassifizierung', 'Bereich', 'Zelle', 'Raum', 'Schrank', 'OE1', 'OE2', 'OE3', 'Zl', 'Event', 'N', 'TO'],
        colModel:[
            {name:'id',index:'id', width:0, hidden: true},
            {name:'state',index:'state', width:0, hidden: true},
            {name:'ack',index:'ack', width:0, hidden: true},
            {name:'prio',index:'prio', width:0, hidden: true},
            {name:'datum',index:'datum', align:"center",width:120 },
            {name:'lma',index:'lma', width:30, },
            {name:'pic',index:'pic', width:30, align:"center", formatter: imageFormatter },
            {name:'he',index:'he', width:30 },
            {name:'shs',index:'shs', width:30 },
            {name:'klassifizierung',index:'klassifizierung', width:120 },
            {name:'bereich',index:'bereich', width:90 },
            {name:'zelle',index:'zelle', width:90 },
            {name:'raum',index:'raum', width:90 },
            {name:'schrank',index:'schrank', width:90 },
            {name:'oe1',index:'oe1', width:20 },
            {name:'oe2',index:'oe2', width:20 },
            {name:'oe3',index:'oe3', width:20 },
            {name:'zl',index:'zl', width:20 },
            {name:'event',index:'event', width:90 },
            {name:'n',index:'n', width:20 },
            {name:'to',index:'to', width:20 },
        ],
        height: '400',
        //scroll:1,      $("#jsonmap").trigger("reloadGrid",[{current:true}]); does not seem to work with scroll:1 bummer
        autowidth: true,
        rownumbers: true,
        rownumWidth: 40,
        pager: '#pjmap',
        sortname: 'id',
        mtype : 'GET',
        sortorder: "desc",
        gridview: true,
        multiselect : false,
        //cellEdit: true,
        //cellsubmit : 'remote',
        //cellurl : './setdata.html?sessionId='+top.amApp.sessionId,
        //caption: "Alarm und Störungsliste",
        viewrecords: true
    }); 

Now when I comment in srcoll: 1, i.e. using virutal scolling the call to $("#jsonmap").trigger("reloadGrid",[{current:true}]); always relaods the grid to show the beginning of the table, regardless of the current scroll position. Is there a way that I can still use virtual scolling but the reloadGrid only fetches the pages (or rows) that are currently displayed?


The request to the server always contains {sord=desc, page=1,… even though I am on a different page.


Thx for any help

No Tags

About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

50 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9595

Posts: 28789

Membership:

There are 10188 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1157

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (7009 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information