Skip to main content
A newer version of this page is available. .
Tab

ASPxCallbackPanel Class

A callback panel control that allows you to update its content on a callback.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

public class ASPxCallbackPanel :
    ASPxCollapsiblePanel

Remarks

The Callback Panel is a container area that allows you to update its content using an AJAX-based callback technology.

Create a Callback Panel

Design Time

The ASPxCallbackPanel control is available on the DX.19.1: Navigation & Layout toolbox tab in the Microsoft Visual Studio IDE.

Drag the control onto a form and customize control settings, or paste the control markup in the page’s source code.

<dx:ASPxCallbackPanel ID="ASPxCallbackPanel1" runat="server" Width="200px">
    <PanelCollection>
        <dx:PanelContent runat="server">
            <dx:ASPxTextBox ID="ASPxTextBox1" runat="server" Width="170px">
            </dx:ASPxTextBox>
        </dx:PanelContent>
    </PanelCollection>
</dx:ASPxCallbackPanel>

Run Time

protected void Page_Load(object sender, EventArgs e)
{
    ASPxCallbackPanel cpanel = new ASPxCallbackPanel();
    cpanel.ID = "ASPxCallbackPanel1";
    cpanel.Controls.Add(new ASPxTextBox() { ID = "ASPxTextBox1", Text = "Test" });
    form1.Controls.Add(cpanel);
}

Client-Side API

The ASPxCallbackPanel’s client-side API is implemented with JavaScript language and exposed by the ASPxClientCallbackPanel object.

Availability

Available by default.

Class name

ASPxClientCallbackPanel

Access name

ClientInstanceName

Events

ASPxCallbackPanel.ClientSideEvents

Overview

The following API allows you to manipulate the callback panel on the client side:

Use the ASPxPanelContainerBase.Controls property to access the collection of the ASPxCallbackPanel‘s child controls.

Example

Full example - How to implement a custom loading panel for the ASPxCallbackPanel control

<div class="sendCommentBlock">
    <dx:ASPxButton ID="Button" runat="server" Text="Post Comment" AutoPostBack="false">
        <ClientSideEvents Click="SendCommentCallback" />
    </dx:ASPxButton> 
    <br />
    <br />
    <dx:ASPxTextBox ID="TextBox" runat="server" Width="170px"></dx:ASPxTextBox>
</div>

<dx:ASPxCallbackPanel ID="CallbackPanel" ClientInstanceName="CallbackPanel" runat="server" CssClass="pnl" 
OnCallback="CallbackPanel_Callback" OnInit="CallbackPanel_Init">
    <ClientSideEvents BeginCallback="OnBeginCallback" EndCallback="OnEndCallback" />
    <PanelCollection>
        <dx:PanelContent>
            <dx:ASPxLabel ID="CountLabel" runat="server" Text="Comments Count : "></dx:ASPxLabel>
            <br />
            <br />
            <dx:ASPxLabel ID="NoCommentsLabel" runat="server" Text="No Comments" ForeColor="Gray">
            </dx:ASPxLabel>
        </dx:PanelContent>
    </PanelCollection>
</dx:ASPxCallbackPanel>
<dx:ASPxLoadingPanel ID="LoadingPanel" ClientInstanceName="LoadingPanel" runat="server" Modal="true" 
    HorizontalAlign="Center" VerticalAlign="Middle">
    <Image Url="Images/load.gif" Height="50px" Width="50px"></Image>
</dx:ASPxLoadingPanel>

Online Demos

Online Examples

See Also