hjzhbb7758
|
|
« 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
|
|
« Reply #1 on: August 17, 2014, 11:20:52 PM » |
|
|
|
|
Logged
|
|
|
|
hjzhbb7758
|
|
« Reply #2 on: August 18, 2014, 12:41:32 AM » |
|
|
|
|
Logged
|
|
|
|
downkang
|
|
« 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
|
|
|
|
|
hjzhbb7758
|
|
« Reply #5 on: September 02, 2014, 09:17:58 PM » |
|
|
|
|
Logged
|
|
|
|
|
hjzhbb7758
|
|
« Reply #7 on: September 02, 2014, 09:45:03 PM » |
|
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
|
|
« Reply #8 on: September 02, 2014, 09:45:27 PM » |
|
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
|
|
« Reply #9 on: September 02, 2014, 09:45:46 PM » |
|
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
|
|
|
|
|
aswzen
|
|
« 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... 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
|
|
|
|
aswzen
|
|
« 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
|
|
|
|
stworthy
|
|
« Reply #13 on: September 03, 2014, 08:16:40 PM » |
|
Please provide an example to demonstrate your issue.
|
|
|
Logged
|
|
|
|
hjzhbb7758
|
|
« Reply #14 on: September 03, 2014, 08:19:55 PM » |
|
ok, using jquery-easyui-1.4-patch.js version 20140903 .it's fixed . thanks for your help stworthy and thank you 【aswzen】。
|
|
|
Logged
|
|
|
|
|