PDA

View Full Version : [CLOSED] LoadMask on Panel without Loader



Patrick_G
Jan 19, 2013, 1:09 AM
How do I add a load mask to a panel if I am not using a Loader? If I add a loader to a panel like this:



<Loader runat="server">
<LoadMask ShowMask="true" Msg="Please Wait..."></LoadMask>
</Loader>


... the panel fails to load. Somewhere in the Ext code if fails in a urlAppend method. I have seen examples of people adding them on the BeforeShow method via javascript, but I can't seem to get these to work.

We are no longer using Portals, but with Portals I could use the following javascript


portal.el.mask('Please Wait...');

but I am not sure what the code would be for a Panel.

Thank you for your help

Baidaly
Jan 19, 2013, 3:27 AM
Hello!


How do I add a load mask to a panel if I am not using a Loader? If I add a loader to a panel like this:



<Loader runat="server">
<LoadMask ShowMask="true" Msg="Please Wait..."></LoadMask>
</Loader>


... the panel fails to load. Somewhere in the Ext code if fails in a urlAppend method. I have seen examples of people adding them on the BeforeShow method via javascript, but I can't seem to get these to work.

Can you provide more information about this problem? I think we can help to solve it.



We are no longer using Portals, but with Portals I could use the following javascript


portal.el.mask('Please Wait...');

but I am not sure what the code would be for a Panel.

Thank you for your help

To mask panel you can use the same method mask:


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

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html>

<html>
<head runat="server">
<title>Ext.NET Examples</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Viewport runat="server" Layout="Fit">
<Items>
<ext:Panel runat="server" Layout="Fit">
<Buttons>
<ext:Button runat="server" Text="Mask panel">
<Listeners>
<Click Handler="#{Panel1}.body.mask('Please, wait...');"></Click>
</Listeners>
</ext:Button>
<ext:Button runat="server" Text="Unmask panel">
<Listeners>
<Click Handler="#{Panel1}.body.unmask();"></Click>
</Listeners>
</ext:Button>
</Buttons>
<Items>
<ext:Panel runat="server" Title="Panel" Html="Lorem ipsum" ID="Panel1">
</ext:Panel>
</Items>
</ext:Panel>

</Items>
</ext:Viewport>
</form>
</body>
</html>