EasyUI Forum
April 19, 2024, 11:55:56 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: about easyui datagrid in 1.4v load twice  (Read 39792 times)
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« on: August 16, 2014, 05:34:10 AM »

When using datagrid, load the data back {rows: [], total: 0} will request twice
Logged
wade.zhu
Newbie
*
Posts: 27


View Profile
« Reply #1 on: August 17, 2014, 11:20:52 PM »

maybe u need have a look this thread

http://www.jeasyui.com/forum/index.php?topic=3697.0
Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #2 on: August 18, 2014, 12:41:32 AM »

maybe u need have a look this thread

http://www.jeasyui.com/forum/index.php?topic=3697.0

this can not help me !
Logged
downkang
Newbie
*
Posts: 1


View Profile Email
« Reply #3 on: September 02, 2014, 05:46:10 PM »

I do not known why,but I solved it.
at line 1097 in jquery.easyui.min.js:
if(_b3.total==0){
_b3.pageNumber=0;
_b4=0;
}
delete it ,that is OK!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #4 on: September 02, 2014, 06:08:43 PM »

The patch is available for solving this issue. It can be downloaded from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4-patch.zip.
Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #5 on: September 02, 2014, 09:17:58 PM »

The patch is available for solving this issue. It can be downloaded from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4-patch.zip.

I used http://www.jeasyui.com/download/downloads/jquery-easyui-1.4-patch.zip 2014-08-27., But still request two times
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #6 on: September 02, 2014, 09:23:07 PM »

Please refer to this example http://www.jeasyui.com/tutorial/datagrid/datagrid24_demo.html. It do send only one request to the remote server.
Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #7 on: September 02, 2014, 09:45:03 PM »

Please refer to this example http://www.jeasyui.com/tutorial/datagrid/datagrid24_demo.html. It do send only one request to the remote server.

When the datagrid returns no data, there will be a request twice, if the return data is greater than 0. Then it will not repeat request
Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #8 on: September 02, 2014, 09:45:27 PM »

Please refer to this example http://www.jeasyui.com/tutorial/datagrid/datagrid24_demo.html. It do send only one request to the remote server.

When the datagrid returns no data, there will be a request twice, if the return data is greater than 0. Then it will not repeat request

Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #9 on: September 02, 2014, 09:45:46 PM »

Please refer to this example http://www.jeasyui.com/tutorial/datagrid/datagrid24_demo.html. It do send only one request to the remote server.

When the datagrid returns no data, there will be a request twice, if the return data is greater than 0. Then it will not repeat request

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #10 on: September 03, 2014, 02:05:18 AM »

Make sure you are using the newest patch. Please try to download it from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4-patch.zip.
Logged
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« Reply #11 on: September 03, 2014, 03:23:35 AM »

The problem is here >> .datagrid('loadData', {"total":0,"rows":[]});
your demo >> http://www.jeasyui.com/tutorial/datagrid/datagrid24_demo.html.

and your demo is only passing the empty data that came from server, not from local..

Still double load... Sad



even using your newest patch..

i think i know the problem...

your datagrid always re-reload the data if the url already assigned..
if you not  assign the url, the datagrid will reload once..i mean only reload the empty data..not the original data from remote..
« Last Edit: September 03, 2014, 03:38:29 AM by aswzen » Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« Reply #12 on: September 03, 2014, 07:37:04 PM »

need answer......ummm

your newest patch has a bug..when .datagrid('loadData', {"total":0,"rows":[]}) called..the next load function will be ignored..
« Last Edit: September 03, 2014, 07:40:00 PM by aswzen » Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #13 on: September 03, 2014, 08:16:40 PM »

Please provide an example to demonstrate your issue.
Logged
hjzhbb7758
Jr. Member
**
Posts: 84


View Profile Email
« Reply #14 on: September 03, 2014, 08:19:55 PM »

Make sure you are using the newest patch. Please try to download it from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4-patch.zip.

ok, using jquery-easyui-1.4-patch.js  version 20140903 .it's fixed . thanks for your help stworthy and thank you 【aswzen】。
Logged
Pages: [1] 2
  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!