[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Grid View
  [Expand]Tree List
  [Expand]Card View
  [Collapse]Chart Control
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Design-Time Features
   [Expand]Visual Elements
     How to: Add a Chart to a Web Application
     How to: Add a Chart to a Web Page (Runtime Sample)
     How to: Add a Chart to an ASPxCallbackPanel during its Callback (Runtime Sample)
     How to: Bind an Individual Series to a Data Source (Runtime Sample)
     How to: Bind a Web Chart to Data (Runtime Sample)
     How to: Bind a Web Chart to an ASPxPivotGrid
     How to: Show Custom Data Over a Web Chart Using ASPxPopupControl
     How to: Use the Client-Side Model of the WebChartControl
     How to: Show Custom Tooltips for a WebChartControl
     How to: Invoke the Client Chart Designer
     How to: Configure a Chart for Printing
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Add a Chart to an ASPxCallbackPanel during its Callback (Runtime Sample)

This tutorial demonstrates how a WebChartControl can be added to an ASPxCallbackPanel during its callback.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E568.

  1. Create a new ASP.NET Web Application (Visual Studio 2008 or 2010), or open an existing one.

  2. Add the required assemblies to the project.

    Note that if you prefer that the assemblies be added automatically (by dropping a WebChartControl instance onto the page), this affects your web application's Web.config file. To learn about the changes being made to it, refer to Adding a Web Chart.

  3. Switch to the Design view of the Default.aspx page, and from the DX.18.1: Common Controls toolbox tab, drop an ASPxButton onto the page.

  4. Then, click the button's smart tag. In the invoked actions list, disable the AutoPostBack property, and click Client-Side Events... link.

    In the invoked dialog, from within the client-side Click event handler, call the PerformCallback() for the callback panel.

    To apply the changes, and quit the dialog, click OK.

  5. Now, from the DX.18.1: Navigation & Layout toolbox tab, drop an ASPxCallbackPanel onto the page.

  6. Set its ClientInstanceName to panel, and handle its Callback event in the following way.

Run the application, and view the result.

Expanded See Also

Is this topic helpful?​​​​​​​