PDA

View Full Version : GRID PANEL WHIT 100% OF DIV PARENT



fhuggler
21 May 2010, 10:27 AM
HI.

I CREATE ONE GRIDPANEL IN DIV WITH 100% HEIGHT

BUT, THE GRIDPANEL ARE NOT HOLDING 100% HEIGHT...WHERE IS THE ERROR?

var grid = new Ext.grid.GridPanel({
renderTo: 'mydiv',
store: ds,
cm: column_model,
viewConfig: { forceFit: true},
border: false,
stripeRows: true,
loadMask: true
});

Thanks for everything!

LostSoul
21 May 2010, 1:02 PM
this is what you need, it works perfect

http://www.extjs.com/forum/showthread.php?28318-Fit-to-parent&highlight=[new+Ext.ux.plugins.FitToParent%28gridParentDiv%29]

here is an example of a div I am using it in


<div id="gridParentDiv" style="height:100%;">
<div id="search-panel" style="width:100%;overflow:hidden"></div>
</div>



var panel = new Ext.Panel({
applyTo: 'search-panel',
plugins: [new Ext.ux.plugins.FitToParent(gridParentDiv)],
layout: 'fit',
items: grid
});

and you will need to add the plugin that is created
that will save you some headaches

fhuggler
21 May 2010, 3:37 PM
Very Thanks my Friend!!!! Obrigado mesmo.