EasyUI Forum
May 06, 2024, 06:34:44 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: Datagrid load data  (Read 8178 times)
enber79
Newbie
*
Posts: 9


enber79


View Profile Email
« on: June 29, 2016, 12:25:27 AM »

Hi all. I have a site that contain 4 datagrid. When you enter the site you only see one, and clicking in different buttons load window component with datagrid inside. The problem is that when you enter the site, all datagrid data is loaded (shown and hidden datagrid's), and this ofc is a several load impact. ¿Can I load datagrid data only when I go to show that datagrid?

Thanks
Logged
jarry
Administrator
Hero Member
*****
Posts: 2262


View Profile Email
« Reply #1 on: June 29, 2016, 05:37:52 PM »

You can use the delay loading tech to define your window.
Code:
<div class="easyui-window" data-options="closed:true,href:'content.php'"></div>
As the code above shows, the window's content isn't loaded until you open it. All the window content including the datagrid can be placed in the 'content.php' page.

If you only want to delay loading data into datagrid, just remove the 'url' property value. When the window opened, call 'load' method to reload its data.
Code:
$('#dg').datagrid('load', url);
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!