View Full Version : EXTJS 3.1 TreeGrid - Grouped Column Headers

4 Jan 2010, 2:03 PM

I have been working on an issue where I needed a collapsible grid. Naturally after looking through the EXT examples and doing some browsing I figured the TreeGrid would be the perfect solution since the project I am on already uses version 3.0.3 of the EXTJS library and would be hopefully easily upgraded to 3.1. After working through some initial roadblocks, I have only one issue left before completing this portion of my project.

The problem I need resolved is allowing for grouped column headers in my TreeGrid. Now after doing more research, I discovered that the TreeGrid actually does not observe over a grid panel but a TreePanel (figured this out when I was attempting to use an XML store). This essentially means that the currently offered extension for the GroupedColumnHeaders extension would not work for a TreePanel (this is because the extension uses a grid's GridView to perform the operation and since a treepanel does not have a GridView, or a view at all that I can retrieve from the TreePanel base class itself ex: tree.getView() it will just break.)

I was wondering if anyone had come up with a solution that allows you to make grouped column headers in a TreeGrid (or possibly a Columned Tree). If so do you mind sharing that solution with me?

If I can't find a solution my only two choices are:
1) Scrap what I have right now and work on using http://max-bazhenov.com/dev/ux.maximgb.tg/examples/client_expander/index.html since it seems to use the GridView (i believe), and possibly will allow me to use a GroupedColumnHeader extension.


2)create my own extension (never done one) using the GroupdColumnHeader extension already existing as a framework on first how to make one and secondly on how to extend the current TreeGridColumns or TreeGridNodeUI objects to allow for column grouping.

I have exhausted searching on both Google and the forums for anything remotely close to this problem, so now I am asking for help here to avoid "re-inventing the wheel" and to stop wasting more time searching for an answer I can't find anywhere online for the last couple of days. My experience with extjs is not that great, just started using it for this project, and have only really used it for charting, popup windows, grids and manipulating html elements, so just basic stuff here and there.

Thanks in advance for any assistance you can give me.