- Online Barcode Generator
- How To
- Buy Now
Data Binding of Chart in WinForms C# Tutorial
The WinForms Chart control provides the support of data binding for designing the user interface in Windows Forms. The Chart control is compatible with the standard Windows Forms data binding model and allows bind the charts to any custom business object, database or declarative data source. This Chart can be bound to a wide variety of data sources and business objects, including MS SQL, Oracle, MySQL, Access ODBC as well as XML data. The data source must implement IEnumerable interface in general. Whatâs more, developers can customize the binding of WinForms Chart control by using ITypedList, ICustomTypeDescriptor, and INotifyPropertyChange interfaces with business objects.
Data Binding Interfaces and Properties for Chart
WinForms Chart control is compatible with the standard data binding model in Windows Forms. This Chart control support of data binding to any data source with implementing one of the following interfaces:
The following are the series types and the properties that may be used for data binding and the data binding will be processed on the descendant of Chart Series.
How to Bind Chart to DataTable
The WinForms Chart control allows users binding to DataTable really easy. Developers can set the necessary members to the desired fields when the table is created. The following C# code shows how to bind data to Line Series.
How to Bind Data to BindingList
The WinForms Chart control support of binding data to BindingList, and the binding list is a generic list type in which additional control over list items included. The binding list can be edited, removed or added. The following sample illustrates how to create a list of MyCustomObject, initializes the list and assigns it to the Bar Series object in Chart control for Windows Forms applications.
UI Controlsfor Windows Forms.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls