Forum


01:33

23/05/2012

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
Most Users Ever Online: 715
Currently Online:
61 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66