Functional Program Using Data Binding

The following code, when added to a new project with the C1Chart control added to the form, demonstrates a fully functional program using data binding. Please note that it is also necessary to create and handle the Form_Load event. The database used in this sample is the NorthWind database supplied and used by Microsoft, as well as by ComponentOne Studio for .NET. If the file path does not match your installation, it will be necessary to change the database before execution.

The following sample manipulates the database and C1Chart entirely through code. However, using the Microsoft .NET IDE and its property sheet, the entire setup can be managed at design time. Please note that the use of two DataAdapters with TableMapping allows a single DataSet to be used as the DataSource, with two series charted from the same table.

      Visual Basic

      C#


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.