PDA

View Full Version : LockingColumn V2 (with grouping grid support)



MeDavid
26 Nov 2009, 7:28 AM
We have a (work in progress) new extension for locking columsn which could also support grouping gridview.

The previous version (http://www.extjs.com/forum/showthread.php?t=17942) was hard to maintain as it dependend on the internal gridview structure in the standard extjs grid. The new version follows the plugin pattern and is less dependend on the extjs internal grid structure.

How does it work
In the previous version we modified the gridview to contain two grid bodies. Now we create a clone of the grid and keep them both in sync (regarding scrolling and selection).

This new approach is not (yet) as stable as the previous version, but has more potential (we could easily modify it to support locking columsn on the left or on the right, port it to extjs 3 etc.)

Let me know what you thing of this new approach to locking columns!

Demo: http://www.jool.nl/jool-tech-zone/extjs-contributions/

Xander75
27 Nov 2009, 12:00 AM
Hi,

Tried out your demo and it looks good, like you said the original version was hard to use.

Hopefully a plugin version will be easier to use.

I tested this in Firefox, it works inititally but when I scrolled to the bottom the last row was out of sync due to the horizontal scrollbar height that is not compensated in the locked part of the grid. Also after scrolling horizontally it lost sync completely and only the scrolling area would move.

The following errors appeared when this occured.



Permission denied to access property 'nodeType' from a non-chrome context
chrome://firebug/content/blank.gifwhile(p && p.nodeType == 1 && de...h < maxDepth && p != b && p != stopEl){\n
ext-all-debug.js (line 2268)



Permission denied to access property 'dom' from a non-chrome contextchrome://firebug/content/blank.gif
return D.isAncestor(this.dom, el.dom ? el.dom : el);\n
ext-all-debug.js (line 2407)

Not sure what version of Ext you are supporting but we use Ext v2.1, to be honest it would be nice to move to a more recent version but I think we would have too many issues to resolve if we did! lol

It's a very nice start and I look forward to a testing a more stable version.

P.S. If this works for the grouping gridview would it possibly work as a plugin to the maximgb treegrid extension?

MeDavid
27 Nov 2009, 1:22 AM
Hi,

I tested this in Firefox, it works inititally but when I scrolled to the bottom the last row was out of sync due to the horizontal scrollbar height that is not compensated in the locked part of the grid. Also after scrolling horizontally it lost sync completely and only the scrolling area would move.

The following errors appeared when this occured.
....


Thanks for noticing. I applied the fix from condor see this post (http://www.extjs.com/forum/showthread.php?p=366510#post366510).

The error should be solved. I would need to test it with other plugins and gridviews like the treegrid. Feel free to give it a spin and share your experience.