Hi there,
I'm trying to create a modal loading panel that disables all background page functionality until a page redirection occurs. Like a "please wait while something happens" message.
I'm familiar with using the ASPxLoading Panel on components.
ASPx<dxe:ASPxLoadingPanel ID="ASPxLoadingPanel" runat="server" ClientInstanceName="loadingPanel" Modal="True" Visible="True" ></dxe:ASPxLoadingPanel>
And then I use it as:
ASPxloadingPanel.ShowInElementByID(someTextBox.name);
I'd like to do this sort of thing, but have it screen centered and as a modal that wouldn't allow the user to fiddle about with other stuff.
How can I accomplish this?
EDIT
After doing some thinking, I've rather decided to go for displaying a custom ASPxPopupControl instead:
ASPx<dxpc:ASPxPopupControl runat="server" ClientInstanceName="searchPopup"
HeaderText="Quick Search" Modal="True" PopupHorizontalAlign="WindowCenter"
PopupVerticalAlign="WindowCenter" AllowDragging="false" Width="250px" Height="85px">
<ContentCollection>
<dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
<table align="center">
<tr align="center">
<td align="center">
<dxe:ASPxLabel runat="server" Text="Searching..."/>
</td>
</tr>
</table>
</dxpc:PopupControlContentControl>
</ContentCollection>
<HeaderStyle VerticalAlign="Middle" />
<HeaderImage Url="~/Images/Icons/view.png" />
</dxpc:ASPxPopupControl>
So far this works well. It is displayed in the center of the screen, has a nice title, and I can place all sorts of components within it.
I do have a few problems with this component though:
- It has a close button by default.
- Clicking anywhere next to this ASPxPopupControl causes the dialog to be automatically closed, hence it's not modal at all even though its Modal property is set to true.
How can I
a) Hide this default close button or disable it?
and
b) Ignore any clicks the user makes outside of this ASPxPopupControl to prevent it from automatically closing?
Thanks,
JP
Hello,
Based on the provided information, it's not clear whether you need to display a panel near the ASPxTextBox or you need to make the ASPxLoadingPanel model only for a part of your content. Would you please clarify this?
No problem, let me clarify my situation:
I have a "Quick Search" textbox that does some magic and then directs the user to a page containing results. The dataset this search works with can at times be large and may take around 2-3 seconds for a result to be ready, hence I need a way to tell the user that all is okay and they just need to wait.
After doing some thinking I've rather gone for displaying a custom ASPxPopupControl instead. Please see my edit above.