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 DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlChart PropertyChart GridChart Series TypesChart Series - AreaChart Series - BarChart Series - LineChart Series - ScatterChart Series - ScatterLineChart Series - PieChart Series - DonutChart Series - PolarChart Series - RadarChart AxesChart Axes - CategoricalChart Axes - DateTimeChart Axes - LinearChart Axes - LogarithmicChart Axes - PolarChart Axes - PlotModeChart Axes - RadicalChart Axes - Multiple AxesChart FeatureChart - Scroll and ZoomChart - SelectionChart - TooltipChart - TrackballChart - TitleChart - LegendChart - Smart LabelsChart - Drill DownChart Data BindingChart Custom PaletteChart Custom RenderingWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |