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

Edit sortable selectable li with jquery-ui

jquery-ui jquery-ui-sortable jquery-ui-selectable

I want to allow editing list items in a selectable / sortable list.

Is there any JSON Web Token (JWT) example in C#?

c# oauth oauth-2.0 jwt

I feel like I'm taking crazy pills here. Usually there's always a million library and samples floating around the web for any given task. I'm trying to implement authentication with a Google "Service