I've searched the forum for this and could not find it already having been reported. This is really surprising to me since I noticed it right away when I started to develop a page.

Ext version tested:

Ext 3.2 rev 1

Adapter used:

?

css used:

only default ext-all.css

Browser versions tested against:

IE6
FF3.6
Safari 4

Operating System:

WinXP Pro

Description:

When a page contains more than one treegrid, the sorting does not work correctly on all but the last grid.
When changing the last grid's sorting, it seems to affect all other grids (not directly) if the column has the same data index.

Add more than one treegrid to a page (just use the extjs example treegrid)
Try to sort any treegrid that was not the last one added (this shouldn't work)
Also, if you sort the last grid added and sort any non-last grids they may sort based on the last grid's sorting state

The result that was expected:

Correct sorting of all treegrids

The result that occurs instead:

Sort did not happen, or was sorted based on last added grid's current sort state

Screenshot or Video:

attached

Debugging already done:

none

Possible fix:

not provided

Reimius

9 Jul 2010, 8:31 AM

After searching through the code and testing some things, I found the fix. It's super simple:

Replace line 57 of TreeGridSorter.js with:
var me = this;

It was:
me = this;
which of course made the variable global to the namespace and therefore all treegrids were refering to the nodes in the treegrid that was last created on the page.