PDA

View Full Version : RowEditor not visible with grid's property "autoHeight"



doxe
18 May 2009, 11:57 PM
Hello everybody,

I've got some issues using the new

doxe
20 May 2009, 7:10 AM
I'm sorry to bump this thread again but i didn't solved this problem.
Can anyone show me a way to get this issue off ?

Thanks in advance everybody !

:)

jtruffot
2 Jul 2009, 12:53 AM
Hi,

I had the same problem. My solution is to resize the grid main body dynamically. I use listeners and a resize method to share code :


new Ext.ux.RowEditor({
listeners: {
move: function(p){ this.resize(); },
hide: function(p){
var mainBody = this.grid.getView().mainBody;
var lastRow = Ext.fly(this.grid.getView().getRow(this.grid.getStore().getCount()-1));
mainBody.setHeight(lastRow.getBottom() - mainBody.getTop(),{
callback: function(){ mainBody.setHeight('auto'); }
});
},
afterlayout: function(container, layout) { this.resize(); }
},
resize: function() {
var row = Ext.fly(this.grid.getView().getRow(this.rowIndex)).getBottom();
var lastRow = Ext.fly(this.grid.getView().getRow(this.grid.getStore().getCount()-1)).getBottom();
var mainBody = this.grid.getView().mainBody;
var h = Ext.max([row + this.btns.getHeight() + 10, lastRow]) - mainBody.getTop();
mainBody.setHeight(h,true);
}
});I put a screencast demo of the results on youtube (http://www.youtube.com/watch?v=hOUc9H-O_60).

I hope that could help ! ;)

doxe
15 Jul 2009, 5:08 AM
Hello jtruffot,

Your trick solves the problem.
Thanks !!

Sincklation
22 Oct 2009, 11:45 AM
nice job jtruffot ! thxs.

reddyonrails
17 Nov 2009, 4:13 AM
Thanks a lot :-)