3

I can't seem to set the position of an Ext.NET GridPanel inside an Ext.NET window and I wonder why?

<ext:Window ID="Window1" runat="server" StripeRows="true" Width="900" Height="700"
    Closable="false" Collapsible="true" Maximizable="true" Layout="Fit" 
    X="0" Y="0"
    CenterOnLoad="false">
    <Items>
        <ext:GridPanel ID="customersGrid" runat="server" />
     //.....................

When I change X and Y it doesn't take effect.

Rob
  • 45,296
  • 24
  • 122
  • 150
Alexandre
  • 13,030
  • 35
  • 114
  • 173

2 Answers2

2

If you want the GridPanel to be absolutely positioned somewhere inside the Window, you'll have to set Layout="Absolute" on the <ext:Window>, and set the .X and .Y properties of the <ext:GridPanel>.

Hope this helps.

geoffrey.mcgill
  • 2,375
  • 1
  • 13
  • 21
1

I think Layout="Fit" gives you issue, check that..

Bhargav Mistri
  • 944
  • 8
  • 20
  • check constraintoviewport property if exist then set it false and use moveto method in code behind there one more element Ext.Element check it too. – Bhargav Mistri Aug 01 '11 at 13:13
  • and check this URL it will help you,http://www.java2s.com/Code/JavaScript/Ext-JS/Setcontrolxyposition.htm – Bhargav Mistri Aug 01 '11 at 13:16