I noticed that if a grid is placed inside tags, and the width of the grid is set to auto (or just left unspecified), the grid becomes like 4 times the actual width of the page.
If the grid is NOT inside the tags, and the width of the grid is set to auto (or just left unspecified), the grid spans the actual width of the page as expected.
I tested this with the example in http://extjs.com/deploy/dev/examples/grid/array-grid.html.
First I commented out line 90 (//width:600,) in "array-grid.js"
Then tested in firefox 3.0 and iexplorer7, with version Ext JS Library 2.1
The width of the grid in firefox was ok. In iexplorer7 it was weird, the header as ok but cells were wider than the screen.
Then I added the tags in line 27 in "array-grid.html" like so:
you must specify an explicit width for GridPanels.
as for the
OR let a layout (or a custom patch) handle sizing. But some code must supply a width for IE.
topContainer is just a div that I know will always be the width of the browser, and the -200 is just so that the grid leaves some space for other suff. The last thing I did was add an event so that the grid changes it's size whuen the browser gets resized.
Ext.EventManager.onWindowResize(
function (w, h){
activitiesGrid.setWidth(el('topContainer').getWidt h()-200);
},
this);
Working well so far!
#If you have any other info about this subject , Please add it free.# |
