BootstrapCallbackPanel Class
Represents a panel control that acts as a container for other controls and allows its content to be updated, via callbacks.
Namespace: DevExpress.Web.Bootstrap
Assembly: DevExpress.Web.Bootstrap.v24.2.dll
Declaration
[DXClientDocumentationProviderWeb("BootstrapCallbackPanel")]
[ToolboxBitmap(typeof(BootstrapToolboxBitmapAccess), "Bitmaps256.BootstrapCallbackPanel.bmp")]
[ToolboxTabName("DX.24.2: Bootstrap Controls")]
public class BootstrapCallbackPanel :
ASPxPanelContainerBase,
ISimpleRenderControl
Remarks
The BootstrapCallbackPanel control represents a container area whose content can be updated using an AJAX-based callback technology. The collection of the BootstrapCallbackPanel‘s child controls can be accessed via the ASPxPanelContainerBase.Controls property.
The BootstrapCallbackPanel control implements a comprehensive client-side and server-side functionality to enable updating its content on demand via callbacks. The client-side object model contains the client object for the BootstrapCallbackPanel control (BootstrapClientCallbackPanel), its method requires sending a callback to the server (BootstrapClientCallbackPanel.PerformCallback), and methods allowing specific client operations to be performed when a callback sends to, and comes from the server side (BootstrapClientCallbackPanel.BeginCallback and BootstrapClientCallbackPanel.EndCallback). A handler for the available client-side events can be assigned by using the control’s BootstrapCallbackPanel.ClientSideEvents property. An instance of the BootstrapClientCallbackPanel object can be easily identified on the client by using the client programmatic identifier set via the ASPxPanelBase.ClientInstanceName property.
The required server-side processing of a callback sent from the client side by using the BootstrapClientCallbackPanel.PerformCallback method can be performed in a handler of the control’s server-side BootstrapCallbackPanel.Callback event.
Example
This example demonstrates the basic functionality of the Callback Panel.
- Initialize a new instance of the
BootstrapCallbackPanel
class. - Add required controls to the
ContentCollection
array. - Use the client BootstrapClientCallbackPanel.PerformCallback method to initiate a callback. Handle the BootstrapCallbackPanel.Callback event to process a callback on the server side.
The image below shows the result:
protected void CallbackPanel_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e) {
if(!string.IsNullOrEmpty(e.Parameter))
passedInfo.InnerText = "Passed information: \"" + e.Parameter + "\"";
}