EasyUI Forum
June 24, 2024, 11:36:42 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: Stop display of datagrid until data is fully loaded?  (Read 6179 times)
simplescience
Newbie
*
Posts: 4


View Profile Email
« on: June 04, 2015, 08:17:07 AM »

Is there a way to stop the display of an edatagrid until all the data is loaded - potentially showing a loading spinner?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 04, 2015, 08:30:11 AM »

You can create the datagrid and then hide it. When the data is loaded successfully, display the panel again and resize the datagrid.
Code:
$('#tt').edatagrid({
    onLoadSuccess:function(){
        $(this).edatagrid('getPanel').panel('open');
        $(this).edatagrid('resize');
    }
}).edatagrid('getPanel').panel('close');
Logged
simplescience
Newbie
*
Posts: 4


View Profile Email
« Reply #2 on: June 04, 2015, 11:41:21 AM »

Thanks for that.  It works.  I did need to hide the table header as well, and show it when done.  However, that did work.

Thanks again.
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!