View Full Version : [CLOSED] GridPanel doesn't automatically resize using 'fit' layout and IE9

Oct 12, 2012, 10:24 PM
I have a GridPanel inside of a Panel where the Panel is using a Layout="fit". The GridPanel has ForceFit=true. Works fine on Firefox and Chrome. When the window is resized to a larger size on IE9, the Panel and GridPanel respond correctly by re-laying out the contents. But, when the window is made smaller, data clips because it isn't executing the re-layout.

The GridPanel is the only 'Item' of the Panel.

I can produce an example if it helps.

Oct 12, 2012, 11:46 PM
Is this the same problem posted here...


Oct 15, 2012, 7:07 AM

If it is another problem, then yes, please provide a sample to reproduce.

Oct 15, 2012, 3:00 PM
The code is the same as the other problem, but the issues are different. In the other post, I can't resize the columns correctly. In this post, the Grid isn't resizing correctly with the window (specifically, when I make the browser window smaller), only in IE. I posted a simplified example on the other topic, but unfortunately, simplifying the code made this problem disappear. :( I still have the problem in a more complex case, but I'll have to work more on a simple failure example.

Thanks for now.

Oct 15, 2012, 4:28 PM
Ok, thank you for the details.

Seems I can't see a proper layout configuration which would manage the GridPanel size on window resizing.

Here is a simplest working case.


<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
if (!X.IsAjaxRequest)
Store store = this.GridPanel1.GetStore();
store.DataSource = new object[]
new object[] { "test1", "test2", "test3" },
new object[] { "test4", "test5", "test6" },
new object[] { "test7", "test8", "test9" }

<!DOCTYPE html>

<head runat="server">
<title>Ext.NET v2 Example</title>
<ext:ResourceManager runat="server" />

<ext:Viewport runat="server" Layout="FitLayout">
<ext:GridPanel ID="GridPanel1" runat="server">
<ext:Store runat="server">
<ext:Model runat="server">
<ext:ModelField Name="test1" />
<ext:ModelField Name="test2" />
<ext:ModelField Name="test3" />
<ColumnModel runat="server">
<ext:Column runat="server" Text="Test1" DataIndex="test1" Flex="1" />
<ext:Column runat="server" Text="Test2" DataIndex="test2" />
<ext:Column runat="server" Text="Test3" DataIndex="test3" />

More layout examples you can find here:

If you can provide a mockup of required layout, we could suggest something.

Oct 15, 2012, 7:02 PM
I believe I figured out the problem. My <!DOCTTYPE> tag was not the first html tag -- it was following the <script> stuff. This caused IE to go into "Quirks" mode. Moving the tag up above the <script> tag solved the problem.


Oct 16, 2012, 4:55 AM
Yes, I think that doctype declaration must go before the <html> tag.