EasyUI Forum
March 29, 2024, 12:45:52 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Treegrid with Lazy loading nodes+ client side pagination +column filtering  (Read 5217 times)
saurabh
Newbie
*
Posts: 12


View Profile Email
« on: July 25, 2017, 06:42:05 AM »

I am using treegrid which has 50k rows. Because of slow loading issue in internet explorer i have updated treegrid code to 'Lazy loading nodes' but however column filtering and client side pagination does seems to working. can you please provide some sample working example treegrid with Lazy loading nodes+ client side pagination +column filtering. so that grid will load rows quickly. Thanks in advance.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: July 25, 2017, 06:13:28 PM »

The filter extension has the build-in client-paging functionality. You don't need to call the 'clientPaging' method again. Please look at this example http://code.reloado.com/ororov4/edit#preview
Logged
saurabh
Newbie
*
Posts: 12


View Profile Email
« Reply #2 on: July 26, 2017, 01:25:25 AM »

Hello Hero Administrator,
                   Thanks for reply!! but this code doesn't seems to work with  won't seem to work with myLoadFilter

function myLoadFilter(data,parentId){
         function setData(data){
            var todo = [];
            for(var i=0; i<data.length; i++){
               todo.push(data);
            }
            while(todo.length){
               var node = todo.shift();
               if (node.children && node.children.length){
                  node.state = 'closed';
                  node.children1 = node.children;
                  node.children = undefined;
                  todo = todo.concat(node.children1);
               }
            }
         }
         
         setData(data);
         var tg = $(this);
         var opts = tg.treegrid('options');
         opts.onBeforeExpand = function(row){
            if (row.children1){
               tg.treegrid('append',{
                  parent: row[opts.idField],
                  data: row.children1
               });
               row.children1 = undefined;
               //alert(row[opts.idField]);
               tg.treegrid('expand', row[opts.idField]);
            }
            return row.children1 == undefined;
         };
         return data;
      }

and is there any way so that i can reduce more load time with treegrid
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: July 26, 2017, 02:41:03 AM »

You don't need to override the 'loadFilter' function. This example works fine.

http://code.reloado.com/ororov4/edit#preview.
Logged
saurabh
Newbie
*
Posts: 12


View Profile Email
« Reply #4 on: July 26, 2017, 04:07:13 AM »

If i don't use load filter it takes more than 5 mins to load rows on internet explorer!!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: July 26, 2017, 05:21:09 PM »

Please look at this example http://code.reloado.com/ororov4/2/edit#preview. It displays 10000 rows quickly. If you have more than rows, using remote paging, remote filtering and delay loading tech may be more suitable.
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!