| 
					 Title: Infinite loop using scrollview in subgrid when empty data is returned Post by: Juan Antonio Martínez on July 12, 2015, 09:25:34 AM Hi, all: 
					Using scrollview in datagrid subgrid, I get some extrange results - first call to load() does not provide 'page' and 'rows' parameters to server - When empty data is returned ( {"total":0,"rows":[]} ) request is sent again, but now 'page' and 'rows' are properly sent ... and received again an emtpy response so entering in an infinite loop Using easyui-1.4.2 and latest scrollview.js from web you can see sample code at: https://github.com/jonsito/AgilityContest/blob/tablet_optimization/agility/tablet/tablet_competicion.php When using scrollview in main datagrid (i.e not in a subgrid) everything works fine Think this is related to this (old) question: http://www.jeasyui.com/forum/index.php?topic=2300.msg5158#msg5158 Any ideas? Thanks in advance Juan Antonio Title: Re: Infinite loop using scrollview in subgrid when empty data is returned Post by: jarry on July 12, 2015, 07:05:00 PM Please try to download the newest 'datagrid-scrollview.js' file from http://www.jeasyui.com/extension/datagridview.php 
					Title: Re: Infinite loop using scrollview in subgrid when empty data is returned Post by: Juan Antonio Martínez on July 13, 2015, 12:26:26 AM (Thanks for your quick response) 
					Sorry: no luck. - First issue (lack of page & rows parameters on first request) now is solved - But second one ( infinite request loop when response is "empty" {"total":0,"rows":[]} ) still persists Again: when using scrollview in main datagrid everything works. Failure is only shown when using scrollview in subgrids EDIT: This one-liner patch solves second issue; but no idea about collateral effects Code: easyui-1.4.2/extensions/datagrid-view/datagrid-scrollview.js Juan Antonio Title: Re: Infinite loop using scrollview in subgrid when empty data is returned Post by: jarry on July 13, 2015, 01:07:22 AM The reason of infinite loop is that 'onLoadSuccess' event handler calls the 'fixDetailRowHeight' method. This method triggers the 'scroll' event, which will make a new request to the server. To solve this issue, just add the code below to the 'onLoadSuccess' code. 
					Code: onLoadSuccess:function(data){Title: Re: Infinite loop using scrollview in subgrid when empty data is returned Post by: Juan Antonio Martínez on July 13, 2015, 02:13:40 AM OK. Now everything works fine. Thanks 
					Juan Antonio  |