New to Telerik UI for WinForms? Download free 30-day trial

Getting Started with WinForms ChartView

The example below demonstrates setting up RadChartView to display data from the Northwind database.

Setting up the Form 

  1. Create a new Windows Application project.

  2. Drop a RadChartView control on the form.

Connecting to Data

  1. Open the Smart Tag of the control and in the Cooose DataSource drop down select Add Project Data Source.. WinForms RadChartView Data Smart Tag

  2. In the Data Source Configuration Wizard, select the Database icon, and click Next. WinForms RadChartView Data Source Configuration Wizard

  3. In the Choose a Database Model page of the wizard, select the Dataset icon and click Next.

  4. In the Choose Your Data Connection dialog, click on the New Connection button. This will display the Add Connection dialog.

  5. In the Change Data Source dialog, select Microsoft Access Data Base File from the data source list.

  6. Click OK to close the Change Data Source dialog.

  7. In the Add Connection dialog, click on the Browse button. This step will display the Select Microsoft Access Database File dialog.

  8. In the Select Microsoft Access Database File dialog, navigate to Telerik UI for WinForms installation directory and locate the Nwind.mdb file within the \Examples\QuickStart\Datasources directory. Select Nwind.mdb and click OK to close the Select Microsoft Access Database File dialog.

  9. Click OK to close Add Connection dialog.

  10. In Choose Your Data Connection page of the wizard, click Next. This step will display a Microsoft Visual Studio dialog that prompts to ask if you want to copy the file to your project. Click Yes to close the dialog.

  11. In Save the Connection String to the Application Configuration File page of the wizard, click the Next button.

  12. In Choose Database Objects page of the dialog, select the Employees table WinForms RadChartView Choose Database Employees Objects

  13. Back in the Smart Tag of the control click on the Series drop-down button and open the ChartSeries Collection Editor dialog. Add a new BarSeries. WinForms RadChartView ChartSeries Collection Editor

  14. Set the CategoryMember and ValueMember fields to LastName and Extension respectively. Make sure that the DataSource property points the Employees binding source instance. WinForms RadChartView Set CategoryMember ValueMember

  15. Press F5 to run the application. WinForms RadChartView Getting Started

See Also

Telerik UI for WinForms Learning Resources

In this article