PDA

View Full Version : Nested grids in a treegrid



da_b0uncer
14 Feb 2012, 3:51 AM
I have nodes and every node can have n sub-nodes. But every node also has n records:


{
name: 'root'
data: [
{ a: '123', b: '123' ...},
{ a: '123', b: '123' ...},
{ a: '123', b: '123' ...},
...
]
children: [
{
name: 'something',
data: [
{...},
{...},
{...},
...
],
children: [...]
},
{
name: 'somethingelse',
data: [
{...},
{...},
{...},
...
]
children: [...]
},
...
]
}


So it's like I have a tree, where every node is a table with n*m cells.
Is it possible to nest those grids in a tree?

mitchellsimoens
14 Feb 2012, 5:33 AM
You can render a component to any element but it gets difficult to manage those components

da_b0uncer
14 Feb 2012, 5:47 AM
Any? That's good, thanks!

This "Trees with tables for nodes" was the first idea I had by looking at the data-structure, maybe there is an easier way to do it.

Romick
14 Feb 2012, 6:34 AM
Are looking for tree panel?
http://docs.sencha.com/ext-js/4-0/#!/example/tree/treegrid.html
But to look as grid just add cells borders in css.

Or also if you really need a grid inside in tree node than you can look here:
https://github.com/mitchellsimoens/Ux.grid.plugin.AssociationRowExpander
screenshots:
31695

mitchellsimoens
14 Feb 2012, 6:36 AM
@Romick

Are you finding that useful? Any issues with it?

da_b0uncer
14 Feb 2012, 6:53 AM
This was the idea:31696Every node, even those who contain nodes, can have n data-records with m columns ( but the column count is for every record of every node the same, probably the record count is the same for every node too).I thought of putting a grid for every expanded node in the tree...

Romick
17 Feb 2012, 7:16 AM
@mitchellsimoens

Yes it is cool. I extended it but with no sucsess. It would be great if there were a cascade nesting.

For now i didn't use it, because itisn't actualy what i need. But i see in me future widget i will defunetlly use it.

Sorry for dellayed reply, some how missed your message. Thanks for sharing this. It's realy cool!