New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

Data Binding RadChart

RadChart has been replaced by RadHtmlChart, Telerik's client-side charting component. If you are considering RadChart for new development, examine the RadHtmlChart documentation and online demos first to see if it will fit your development needs. If you are already using RadChart in your projects, you can migrate to RadHtmlChart by following these articles: Migrating Series, Migrating Axes, Migrating Date Axes, Migrating Databinding, Features parity. Support for RadChart is discontinued as of Q3 2014, but the control will remain in the assembly so it can still be used. We encourage you to use RadHtmlChart for new development.

Many business applications rely on database data, for example MS SQL, Oracle, MySQL, Access ODBC as well as XML data and business objects in multiple-tier scenarios. RadChart allows automatic binding to all of these using either standard Microsoft supplied data source controls SqlDataSource, AccessDataSource, XmlDataSource and ObjectDataSource or any DataSourceControl implementation. The end result is shown in the chart immediately at design-time.

You can also bind RadChart to a data source that implements one of the following interfaces:

  • IEnumerable:Supports simple iteration of a collection. See the MSDN article for more on IEnumerable.

  • ICollection: Extends IEnumerable and supports size, enumerator, and synchronization methods for collections.

  • IList: Extends ICollection and is the base class for lists.

  • IBindingList: Extends IList an supports binding to a data source.

  • IListSource: Provides functionality to an object to return a list that can be bound to a data source.

Some of the implementations of these interfaces include:

You can also bind to XML data through an XMLDataSource or directly to an XML file.

Once you have the data source defined you can use the RadChart Wizard, Property Editor or code for selecting which data columns will be used to populate the chart. The key properties for binding to a data source are:

See Also

In this article