glarsen
|
 |
« on: October 03, 2014, 06:09:25 AM » |
|
Hi,
A Window is being created in code (a result of a drop). The Window contains a DataGrid which is populated with a loader().
When the loader takes a long time to load due to many rows, the Window will not be displayed until the loader is finished. Ideally the Window and DataGrid would be displayed while the loader is running so the user can see 'Processing....' message.
Would you have any ideas solve this?
Thanks, Gary
|
|
|
Logged
|
|
|
|
stworthy
|
 |
« Reply #1 on: October 03, 2014, 07:41:58 AM » |
|
There are many ways to improve the loading speed for the datagrid. Please try to use pagination, bufferview or scrollview on the datagrid.
|
|
|
Logged
|
|
|
|
glarsen
|
 |
« Reply #2 on: October 03, 2014, 08:32:34 AM » |
|
I may not be using pagination correctly. Need to check that out.
Thanks
|
|
|
Logged
|
|
|
|
glarsen
|
 |
« Reply #3 on: October 03, 2014, 10:06:25 AM » |
|
Problem is I can't get the data in pages from the source. That's what's taking the time. Once the data is there the grid loads fast.
I'm thinking of setting up the loader initially with a url with no data, and with the Panel onOpen event, change the url to the real one.
Am I on the right track?
Thanks, Gary
|
|
|
Logged
|
|
|
|
glarsen
|
 |
« Reply #4 on: October 03, 2014, 01:46:10 PM » |
|
Had another attempt at this. I'm guessing it's due to the datagrid being inside a window but not sure.
Moved the datagrid code to the onOpen event of the window thinking that the window would be visible before the datagrid started loading.
No luck. The window was not shown until the data loaded. Anyway around this?
Thanks, Gary
|
|
|
Logged
|
|
|
|
stworthy
|
 |
« Reply #5 on: October 03, 2014, 05:59:02 PM » |
|
You can try to delay loading the datagrid data until window is opened. $('#win').window({ onOpen:function(){ $('#dg').datagrid('load', url); } }); $('#dg').datagrid({ url: null // set to null to prevent from loading data });
|
|
|
Logged
|
|
|
|
glarsen
|
 |
« Reply #6 on: October 04, 2014, 10:50:40 AM » |
|
Hi,
Thanks for your help. Trying out a lot of options but still have no success.
All of the code and html to create the datagrid is now in the window onOpen event. Even with this the window will not display until the datagrid has loaded. Is that the last event to be fired on a window being displayed?
This project is real close to being released to customers so I will be needing an EasyUI license soon. Is there another means by which I can tell a user that the window is being prepared for display?
Background: The app has ability to display multiple datagrids. Putting the datagrids in windows makes them dragable. Maybe a solution would be to make the datagrid dragable, except that the windows styling seems nicer.
Thanks, Gary
|
|
|
Logged
|
|
|
|
stworthy
|
 |
« Reply #7 on: October 04, 2014, 04:13:24 PM » |
|
Please refer to the attached example 'test.zip'.
|
|
|
Logged
|
|
|
|
glarsen
|
 |
« Reply #8 on: October 06, 2014, 07:40:22 AM » |
|
Thanks for the example, but things are behaving differently when creating objects with code. In this example the datagrid is created in the window onOpen() event. When test2.html is opened, nothing will be displayed until the datagrid is populated: https://netvisn.sharefile.com/d/s0f77ac3d0f5456a9I need to inform users that data is being loaded. Thanks for your help, Gary
|
|
|
Logged
|
|
|
|
glarsen
|
 |
« Reply #9 on: October 07, 2014, 09:56:35 AM » |
|
Looks like it's hanging in my Java code before the window displays.
Sorry for bothering you with this one, Gary
|
|
|
Logged
|
|
|
|
|