Hybrid View
-
19 Oct 2011 1:46 AM #1
Nested EXTJS 4 Grids
Nested EXTJS 4 Grids
Hi All,
I am new to ExtJS.
I need to put a Grid inside every row of another grid.
I went through the Grid Plug in example on sencha. But i am only able to put in the text inside rowBodyTpl.
I already have tried example at the following link.
http://mikhailstadnik.com/ext/examples/nested-grid.htm
but it gives an error that i am trying to add a null child to the container Id blah blah.
Please help me out guys.
-
19 Oct 2011 5:17 AM #2
There are several threads about this:
http://www.sencha.com/forum/showthre...ht=nested+grid
Perhaps this will change soon.
Have you had a look at this:
http://dev.sencha.com/deploy/ext-4.0.2a/examples/tree/treegrid.html
It may help for now.
Regards,
Scott.
-
19 Oct 2011 5:20 AM #3
This may help in regards to the first link on the RowExpander issue:
.It is possible to use both the RowExpander and grouping feature in the same grid. Get 4.0.6. The RowExpander shipped with 4.0.2a does not work
Regards,
Scott.
-
20 Oct 2011 11:58 AM #4
thanks for your help frnd but i already have tried those examples.
-
3 Nov 2011 3:54 AM #5
Nested grids Extjs 4
Nested grids Extjs 4
Seems like ExtJs 4 does not support nesting of grids.
Sad!!
will have to roll back to version 3 for the specific issue.
But still if any one comes accross a solution do reply.
Thanks
-
3 Nov 2011 11:53 AM #6
You can do nested grids. It is kind of tricky but can be done.
example:
in your parent grid's config do this:
then in your expandbody event do this:Code:plugins: [{ ptype: "rowexpander", rowBodyTpl: ['<div id="SessionInstructionGridRow-{ClientSessionId}" ></div>'] }],
ThanksCode:var targetId = 'SessionInstructionGridRow-' + record.get('ClientSessionId'); if (Ext.getCmp(targetId + "_grid") == null) { var sessionInstructionGrid = Ext.create('TS.view.client.SessionInstruction', { renderTo: targetId, id: targetId + "_grid" }); rowNode.grid = sessionInstructionGrid; sessionInstructionGrid.getEl().swallowEvent(['mouseover', 'mousedown', 'click', 'dblclick', 'onRowFocus']); sessionInstructionGrid.fireEvent("bind", sessionInstructionGrid, { ClientSessionId: record.get('ClientSessionId') }); }
Timothy


Reply With Quote