EasyUI Forum
October 03, 2025, 04:39:43 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 reload every 'x' seconds: How to remove the visual impact  (Read 25648 times)
getk
Newbie
*
Posts: 23


View Profile
« on: May 20, 2013, 08:04:15 AM »

hi guys,
First of all, thanks a lot for making easyUI. Very powerful and simpler than datatables.
I've got data which changes regulary with user interaction requirement. This needs to be displayed as a grid/table. therefore I've implemented easyUI CRUD datagrid (NOT inline editing, but the simple datagrid). Hence the datagrid needs to refresh (say every 15secs) and reload.

I'm doing like below

Code:
$(function() {
  function grid_refresh() {
$('#dg').datagrid('reload'); // reload grid

setTimeout(grid_refresh, 15000); // schedule next refresh after 15sec
  }

  grid_refresh();
});

My query is
1. Is there a method/option , so that easyUI can detect , if the data has changed, ONLY then reload?
2. Every 15 secs, a loading icon comes + greys out datagrid, which seems like flashing screen. Is there a way to avoid the visual flashing during reload ? i.e. can it load quietly without any visual effect on the UI

Thanks in advance.
« Last Edit: May 20, 2013, 08:34:26 AM by getk » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 20, 2013, 06:31:48 PM »

Set 'loadMsg' property to empty string to hide the loading window.
Code:
$('#dg').datagrid({loadMsg:''});
Logged
getk
Newbie
*
Posts: 23


View Profile
« Reply #2 on: May 21, 2013, 06:29:01 AM »

thanks a lot mate. Worked
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!