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_Related Related Topics sp_TopicIcon
virtual scroll + ajax xml data + go to page programmatically
28/02/2011
13:01
Avatar
LucaB
New Member
Members
Forum Posts: 1
Member Since:
28/02/2011
sp_UserOfflineSmall Offline

Hello,

I found a useful post on the topic,

/blog/?page_id=393/help/simulate-scroll-event-reload-next-page-virtualization/&value=scroll&type=1&include=3&search=1

but it seems not to apply to my scenario.

My configuration: 

$jqgrid_container.jqGrid({

url:'jqgrid',

datatype: 'xml',

colNames:[...],

colModel:[...],

rowNum:100,

rowTotal: $jqgrid_container.data('total-entries'),

rowList:[100,500,1000],

pager: '#jqgrid-pager',

loadui:'block',

gridview:true,

viewrecords: true,

scroll:1,

scrollrows : true,

sortname: $jqgrid_container.data('sortname'),

caption: $jqgrid_container.data('caption'),

onSelectRow: function(id){GridEditing.row(id)},

shrinkToFit:false

})

Everyrthing works fine when I do normal scrolling with mouse, but I can't get it working when I want to go to a specific page. 

The solution $("#mygrid").jqGrid('setGridParam', {page:4}).trigger('reloadGrid') only works when the config option "scroll" is false.

When scroll is 1 or true, the pager tells the correct position (records 301-400 of 933), the rows actually are in the DOM, but there no rows are shown in the grid, and I can't get them in the correct position. 

In the end I tried to do also $("#mygrid").jqGrid('setSelection',true), but it doesn't work.

I will appreciate any help,

Thanks,

Luca

28/03/2011
22:42
Avatar
SteveT
Member
Members
Forum Posts: 14
Member Since:
08/06/2009
sp_UserOfflineSmall Offline

I experienced the same problem.  Here is my attempt at a fix...

In the updatepager function after the line with: 

$(">div:first",ts.grid.bDiv).css({paddingTop: top, height : height - top});

I added:

if (ts.grid.bDiv.scrollTop == 0 && ts.p.page > 1) {

ts.grid.bDiv.scrollTop = ts.p.rowNum * (ts.p.page - 1) * rh;

}

28/03/2011
23:01
Avatar
SteveT
Member
Members
Forum Posts: 14
Member Since:
08/06/2009
sp_UserOfflineSmall Offline

Sorry, its actually after this line in updatepager:

$(">div:first",ts.grid.bDiv).css({height : height}).children("div:first").css({height:top,display:top?"":"none"});

01/08/2011
07:19
Avatar
Rakeka
Brazil
Member
Members
Forum Posts: 3
Member Since:
27/07/2011
sp_UserOfflineSmall Offline

I'm having the same problem, when the option 'scroll' is 'true' or '1' and the page is changed via script ($('#gridID').setGridParam({page: 10}).trigger('reloadGrid');), the pager displays the right info (for example: View 1 101 – 1 150 of 2 000), but, the scroll bar doesn't change position and the grid displays nothing. It appears to be a jqGrid bug, Am I right?

10/08/2011
17:35
Avatar
coke
Member
Members
Forum Posts: 5
Member Since:
20/08/2010
sp_UserOfflineSmall Offline

Looks like if you want to reset paging, you need {page: null} instead of {page: 1}.

10/08/2011
22:04
Avatar
Rakeka
Brazil
Member
Members
Forum Posts: 3
Member Since:
27/07/2011
sp_UserOfflineSmall Offline

coke said:Looks like if you want to reset paging, you need {page: null} instead of {page: 1}.


No, I want to change to an specific page and it does not work with virtual scrolling.

23/10/2011
17:55
Avatar
shuki
Member
Members
Forum Posts: 11
Member Since:
14/06/2009
sp_UserOfflineSmall Offline

Hi,

Can anyone help with this issue?

I have the same problem with dynamic scrolling that when I programmatically load a specific page the grid does not scroll to it.

If I try to scroll to the position of the records in the page using:

grid.closest(".ui-jqgrid-bdiv").scrollTop(2400);

The scroll button moves a bit and fires loading of the page the scroll button is currently on.

Any help will be greatly appreciated.

Thanks

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
51 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