Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]Welcome to DevExpress .NET Documentation
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Expand]Reporting
  [Collapse]Chart Control
   [Expand]Product Information
   [Expand]Getting Started
   [Expand]Fundamentals
   [Expand]Concepts
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Collapse]Examples
     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 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]Grid View
  [Expand]Card View
  [Expand]Vertical Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Image and Data Browsing
  [Expand]Docking and Popups
  [Expand]Site Navigation and Layout
  [Expand]File Management
  [Expand]Multi-Use Site Controls
  [Expand]Scheduler
  [Expand]HTML Editor
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gauges
  [Expand]Data Editors
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [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]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[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.17.2: 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.17.2: 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?​​​​​​​