PDA

View Full Version : Nested Grid



otaviors
12 Jan 2009, 6:31 PM
Hi!

How do I create a nested grid using GXT. Is it possible to add another grid or a HTML table to the content of a Row expander plugin? If this is not possible, is there another way to implement a nested grid?

Thanks!

O

gslender
12 Jan 2009, 7:07 PM
TreeTable?

otaviors
13 Jan 2009, 11:36 AM
Is it possible to configure multiple headers on a TreeTable? For example, could I use it to show a master detail relationship below where the user clicks on the "+" button to access the details?

Summarized Table

http://lh5.ggpht.com/_3NTnOgfX7AA/SWzqTEGwZLI/AAAAAAAAHpU/59ta4VURqBw/s800/nested%20table%20closed.JPG

Detailed Information:


http://lh3.ggpht.com/_3NTnOgfX7AA/SWzqTG3KXKI/AAAAAAAAHpc/2FbvF1nEd4Y/s800/nested%20table.JPG

Thanks!

O

gslender
13 Jan 2009, 8:22 PM
you would need to write your own grid plugin - see > http://extjs.com/explorer/#gridplugins and > http://extjs.com/explorer/#livegroupsummary for examples (combine parts of LiveGroupSummary and Expanding Row)

otaviors
15 Jan 2009, 7:00 PM
Thanks for the info Grant, but I'm new to GWT and I couldn't find any documentation on how to build my own plugin. It looks like i need to extend the


protected String getBodyContent(ModelData model, int rowIndex)

method of the RowExpander class in order to get my nested grid rendered.

Is there any kind of documentation or example on developing customized plugins?

Thanks again!

dpope22
19 Feb 2009, 10:55 AM
I would be interested in this as well. Basically, i need to do the same thing you are (general/detailed relationship when a row is expanded)

aravind
23 Mar 2010, 1:24 AM
I am also looking for similar behavior with grid , any clue how to do this ?

dpope22
23 Mar 2010, 6:33 AM
You can use the Grouping Grid http://www.extjs.com/examples/pages/grid/grouping.html

I ended up using this heavily modified for my use case. If you have a lot of data being displayed and are using paging, you will have to override a few GXT classes to get everything to work.

aravind
23 Mar 2010, 7:41 PM
Thank you very much for your reply . But I am trying to create grid something like
http://www.openfaces.org/demo/treetable/TreeTable_basicFeatures.jsf .
Each row when expands render another grid (I am not insisting that it should be another grid ) . But I need to take child nodes and need to render as child grid .

dpope22
24 Mar 2010, 6:27 AM
Have you looked at the TreeGrid sample?

http://www.extjs.com/examples/pages/treegrid/basic.html

The grid in your example is similar to GXT's TreeGrid.

aravind
24 Mar 2010, 6:52 AM
Yea I did , but problem with Treegrid is Folder nodes doesn't allow attributes in it's row :) . In otherway, I don't want "Folder" all rows should look alike except expander for grouping