EasyUI Forum
May 16, 2024, 04:10:16 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: Sorting treegrid with a large number of columns  (Read 4637 times)
zolotoy
Jr. Member
**
Posts: 89


View Profile Email
« on: August 05, 2015, 10:03:27 AM »

I have implemented some tricks that have been recommended here to improve the overall treegrid performance.
Code:
var origTreegrid_autoSizeColumn = $.fn.datagrid.methods['autoSizeColumn'];
            $.extend($.fn.treegrid.methods, {
                autoSizeColumn: function (jq, field) {
                    $.each(jq, function () {
                        var opts = $(this).treegrid('options');
                        if (!opts.skipAutoSizeColumns) {
                            var tg_jq = $(this);
                            if (field) origTreegrid_autoSizeColumn(tg_jq, field);
                            else origTreegrid_autoSizeColumn(tg_jq);
                        }
                    });
                }
            });

And
Code:
 skipAutoSizeColumns: true,
                onBeforeExpand: function () {
                    $(this).treegrid('options').skipAutoSizeColumns = true;
                },
                onBeforeCollapse: function () {
                    $(this).treegrid('options').skipAutoSizeColumns = true;
                },
                onExpand: function () {
                    $(this).treegrid('options').skipAutoSizeColumns = true;
                },
                onCollapse: function () {
                    $(this).treegrid('options').skipAutoSizeColumns = true;
                },

While the above code has improved performance alot I am still experiencing bad performance. Specifically with sorting. My grid has ~ 20 columns and about 160 rows. Lowering a numbers of rows does not make any difference, but minimizing a number of columns to three removes any delay. So, my question is what else needs to be done to have datagrid actually performing well?

Grid performance is a major issue for us.

Tnanks
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!