Change ASPxGridView SettingsLoadingPanel text dynamically

I need to change ASPxGridView SettingsLoadingPanel dynamically (from code behind if is possible).

For example, when I clicked on checkbox I want text to be 'selecting...' and after click the button to see text 'loading...'

Thanks!

Answers


You can use ASPxClientLoadingPanel method. And also .Shov() method invokes the loading panel.

<dxlp:ASPxLoadingPanel ID="ASPxLoadingPanel1" runat="server" ClientInstanceName="lp">
        </dxlp:ASPxLoadingPanel>

        <dxe:ASPxButton ID="btnShow" runat="server" AutoPostBack="False" 
                        Text="Show" ClientInstanceName="button" >
            <ClientSideEvents Click="function(s, e) {
                lp.Show();
            }" />
        </dxe:ASPxButton>

        <dxe:ASPxButton ID="btnHide" runat="server" AutoPostBack="False" 
                        Text="Hide" ClientInstanceName="button" >
            <ClientSideEvents Click="function(s, e) {
                lp.Hide();
            }" />
        </dxe:ASPxButton> 

Also you can find a demo in this link.

ASPX

<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Example.aspx.cs"
    Inherits="ASPxLoadingPanel_Example" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHolder" runat="Server">
    <dx:ASPxCallback ID="ASPxCallback1" runat="server" ClientInstanceName="Callback">
        <ClientSideEvents CallbackComplete="function(s, e) { LoadingPanel.Hide(); }" />
    </dx:ASPxCallback>
    <div class="BottomPadding">
        <dx:ASPxCheckBox ID="ASPxCheckBox1" runat="server" AutoPostBack="true" Checked="True"
            Text="Display the ASPxLoadingPanel over a specific control">
        </dx:ASPxCheckBox>
    </div>
    <table id="Panel" style="border: Dashed 1px Gray; height: 125px; width: 60%; margin: 30px 20%">
        <tr>
            <td align="center" valign="middle">
                <dx:ASPxButton ID="ASPxButton1" runat="server" Text="Show Loading Panel" AutoPostBack="False">
                    <ClientSideEvents Click="function(s, e) {
    Callback.PerformCallback();
    LoadingPanel.Show();
}" />
                </dx:ASPxButton>
            </td>
        </tr>
    </table>
    <dx:ASPxLoadingPanel ID="LoadingPanel" runat="server" ClientInstanceName="LoadingPanel"
        Modal="True">
    </dx:ASPxLoadingPanel>
</asp:Content>

C#

using System;
using System.Threading;
using System.Web.UI;

public partial class ASPxLoadingPanel_Example : Page {

    protected void Page_Load(object sender, EventArgs e) {
        if(IsCallback) {
            // Intentionally pauses server-side processing,
            // to demonstrate the Loading Panel functionality.
            Thread.Sleep(500);
        }
        LoadingPanel.ContainerElementID = ASPxCheckBox1.Checked ? "Panel" : "";
    }

}

Need Your Help

Questions about task driven branching

project-management workflow dvcs merge branching-and-merging

I'm considering switching from HG to Plastic SCM (http://www.plasticscm.com, mainly because it seems to offer much nicer VS integration), and they promote "task driven branching", that is, branchin...

Flash Pro CS6 SWF animation doesn't loop with Java Script

javascript html flash fullscreen

I'm trying to play in Full Screen an SWF Flash file created in Flash Pro CS6. It plays fine in full screen. I'm still working on the details but the fact is that it doesn't loop and I need it to lo...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.