PDA

View Full Version : Grid RowExpander content



haattila
17 Feb 2009, 5:59 AM
Hello Everybody!

I want to know how can I put grid component in grid or form component also in grid. It would be nice feature. I try searching solution around row expander but i don't succeed.

Thank's

jadrake75
19 Feb 2009, 12:24 PM
It has been a while since I looked at this (last fall sometime), but the RowExpander uses the XTemplate which is a very basic HTML template block. You can write simple attribute values to it, but if you want to show a component, you need to do a little more.


One approach is you can have your template output an HTML span tag with an ID (say "theId"), and then register a listener on the expansion being completed on the parent grid (ie. the thing that has the row expander).
At that point you can use something like XDOM.getElementById("theId") to get the Element of the span tag.
You can then get the El of the Grid (via the call myGrid.el( ) ) and then use something like the insertInto( ) to insert the table into the spanNot sure about the sizing of this, so you might need to apply a style to your span TAG to auto expand etc., but I think this is how I had done it.

Good luck.