EasyUI Forum
May 17, 2024, 02:26:20 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: scrollview causing infinite loop trying to fetch non-existent data  (Read 11417 times)
tomhj
Newbie
*
Posts: 40


View Profile
« on: October 14, 2013, 03:59:06 PM »

I'm upgrading to the latest 1.3.4 jeasyui and want to convert several of my datagrids that use pagination to use virtual scrolling with "view: scrollview".  I downloaded the datagrid-scrollview.js and installed it.  It works pretty well except for the case where there are zero rows to return.

The scrollview/datagrid then goes into an infinite loop trying to fetch more data to fill the view - but the server-side is returning JSON saying there is no more data.  This cycle continues until I kill my browser window.

Code:
  $('#MyGrid').datagrid( { fit: true, pageSize: 40, url: 'GetData', view: scrollview, columns: [ (skipped for brevity) ] });

Server side logging shows:
GetData called
GetData returns this JSON data:  {"total":0,"rows":[]}
GetData called again with additional parms: page=1 and rows = 40
GetData returns this JSON data:  {"total":0,"rows":[]}
GetData called again with additional parms: page=1 and rows = 40
etc...

How can this be fixed?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 14, 2013, 06:54:00 PM »

To fix this issue, please download the updated scroll view from http://www.jeasyui.com/extension/datagridview.php.
Logged
tomhj
Newbie
*
Posts: 40


View Profile
« Reply #2 on: October 15, 2013, 05:17:48 PM »

That fix works nicely for me - thanks!

I found another problem though with scrollview2 for virtual scrolling with detail expansion - I'll start another post for that one.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!