EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: saurabh on July 25, 2017, 06:42:05 AM



Title: Treegrid with Lazy loading nodes+ client side pagination +column filtering
Post by: saurabh 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.


Title: Re: Treegrid with Lazy loading nodes+ client side pagination +column filtering
Post by: stworthy 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


Title: Re: Treegrid with Lazy loading nodes+ client side pagination +column filtering
Post by: saurabh 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


Title: Re: Treegrid with Lazy loading nodes+ client side pagination +column filtering
Post by: stworthy 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.


Title: Re: Treegrid with Lazy loading nodes+ client side pagination +column filtering
Post by: saurabh 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!!


Title: Re: Treegrid with Lazy loading nodes+ client side pagination +column filtering
Post by: stworthy 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.