View Full Version : [FIXED-578] TreeGrid sorting does not work at all in IE
nextdigital
15 Feb 2010, 8:24 PM
TreeGrid Sorting simply doesnt work in IE7 and possibly other versions
this can be seen on the example page: http://www.extjs.com/deploy/dev/examples/treegrid/treegrid.html
the icon changes between ascending/descending but the nodes do not sort
sbuemaint
18 Feb 2010, 8:06 AM
Ext version tested:
Ext 3.1 rev 1
Adapter used:
ext
css used:
only default ext-all.css
Browser versions tested against:
FF3.6 (firebug 1.5 installed)
Operating System:
Vista SP2
Description:
Sort with a specified sortType does not work.
Test Case:
http://www.extjs.com/deploy/dev/examples/treegrid/treegrid.html
Sort on the duration column
See this URL : http://www.extjs.com/deploy/dev/examples/treegrid/treegrid.html
Steps to reproduce the problem:
http://www.extjs.com/deploy/dev/examples/treegrid/treegrid.html
Sort on the duration column
The result that was expected:
Should sort based on the data
The result that occurs instead:
No sorting occurs
Possible fix:
Looks like the code in TreeGridSorter when calling the sortType should pass the attribute instead of the whole node:
var v1 = sortType ? sortType(n1.attributes[p]) : (cs ? n1.attributes[p] : n1.attributes[p].toUpperCase());
var v2 = sortType ? sortType(n2.attributes[p]) : (cs ? n2.attributes[p] : n2.attributes[p].toUpperCase());
Instead of:
var v1 = sortType ? sortType(n1) : (cs ? n1.attributes[p] : n1.attributes[p].toUpperCase());
var v2 = sortType ? sortType(n2) : (cs ? n2.attributes[p] : n2.attributes[p].toUpperCase());
evant
24 Jun 2010, 1:13 AM
This has been corrected in SVN.
yuyu2005
12 Jul 2010, 4:27 AM
var v1 = sortType(n1)!=n1 ? sortType(n1) : (cs ? n1.attributes[p] : n1.attributes[p].toUpperCase());
var v2 = sortType(n2)!=n2 ? sortType(n2) : (cs ? n2.attributes[p] : n2.attributes[p].toUpperCase());
because sortType is a custom function
and its default form is
function(s){return s;}
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.