PDA

View Full Version : [CLOSED] panel height auto adjust height according to the loaded page'height



hujq
Apr 13, 2013, 4:02 PM
hi,

i have a panel on which initially i am loading another page in iframe mode. and on button click i load the content of another page in existing panel using me.PanelChildPages.loadcontent('test.aspx') command. the content of test.aspx page is large and in want this panel to adjust its height according to the page being loaded. i have tried 'autoheight' but its not working.

I cauht to the same problem here: http://forums.ext.net/showthread.php?11673-Panel-height

My aspx code as flow:


<ext:Panel ID="PanelMiddle" runat="server" BodyStyle="text-align:center;" BodyPadding="20"
AutoScroll="true" Flex="3">
<Items>
<ext:Panel ID="PanelLoadForm" runat="server" BodyStyle="text-align:center;" BodyPadding="10"
Flex="3">
<Loader ID="Loader1" runat="server" Mode="Frame">
<LoadMask ShowMask="true" />
</Loader>
</ext:Panel>
<ext:Panel ID="PanelXTemplate" runat="server" BodyStyle="text-align:center;" BodyPadding="10"
Height="1300" Flex="3">
<Loader ID="Loader2" runat="server" Mode="Frame">
<LoadMask ShowMask="true" />
</Loader>
<Items>
</Items>
</ext:Panel>
</Items>
</ext:Panel>

the code behind code:


protected void Page_Load(object sender, EventArgs e)
{
this.PanelLoadForm.Loader.SuspendScripting();
this.PanelLoadForm.Loader.Url = String.Format("FirstSetpForm.aspx");
this.PanelLoadForm.Loader.Mode = LoadMode.Frame;
this.PanelLoadForm.Loader.DisableCaching = false;
this.PanelLoadForm.LoadContent();


this.PanelXTemplate.Loader.SuspendScripting();
this.PanelXTemplate.Loader.Url = String.Format("WorkFlowXTemplate.aspx");
this.PanelXTemplate.Loader.Mode = LoadMode.Frame;
this.PanelXTemplate.Loader.DisableCaching = false;
this.PanelXTemplate.LoadContent();




}



I wnat the loading panel auto adjust its height according the loaded page's content! please give some suggestions!

Daniil
Apr 15, 2013, 4:14 AM
Hi @hujq,



I cauht to the same problem here: http://forums.ext.net/showthread.php?11673-Panel-height


So, have you tried this suggestion?
http://forums.ext.net/showthread.php?11673#post48391

You should use a Loader's Load event in Ext.NET v2 instead of a Panel's Update one in Ext.NET v1.

hujq
Apr 15, 2013, 7:46 AM
Hi @hujq,



So, have you tried this suggestion?
http://forums.ext.net/showthread.php?11673#post48391

You should use a Loader's Load event in Ext.NET v2 instead of a Panel's Update one in Ext.NET v1.


thanks! I have solved the the problem using your suggestion! thank you very much!