--- title: Supported Data Sources ms.date: "03/30/2017" helpviewer_keywords: - "collections [Windows Forms], binding to" - "OLE DB providers [Windows Forms], Windows Forms" - "DataTable class [Windows Forms], binding and Windows Forms" - "Windows Forms, data binding" - "DataView class [Windows Forms], binding and Windows Forms" - "DataViewManager class [Windows Forms], binding and Windows Forms" - "Windows Forms, source data" - "arrays [Windows Forms]" - "data sources [Windows Forms]" - "data providers [Windows Forms]" - "DataSet class [Windows Forms], binding and Windows Forms" - "data [Windows Forms], data providers" ms.assetid: 3d2c43f6-462b-4d35-9c86-13e9afe012e1 --- # Data Sources Supported by Windows Forms Traditionally, data binding has been used within applications to take advantage of data stored in databases. With Windows Forms data binding, you can access data from databases as well as data in other structures, such as arrays and collections, so long as certain minimum requirements have been met. ## Structures to Bind To In Windows Forms, you can bind to a wide variety of structures, from simple objects (simple binding) to complex lists such as ADO.NET data tables (complex binding). For simple binding, Windows Forms supports binding to the public properties on the simple object. Windows Forms list-based binding generally requires that the object support the interface or the interface. Additionally, if you are binding with through a component, you can bind to an object that supports the interface. For more information about interfaces related to data binding, see [Interfaces Related to Data Binding](interfaces-related-to-data-binding.md). The following list shows the structures you can bind to in Windows Forms. A is the most common Windows Forms data source and acts a proxy between a data source and Windows Forms controls. The general usage pattern is to bind your controls to the and bind the to the data source (for example, an ADO.NET data table or a business object). The provides services that enable and improve the level of data binding support. For example, Windows Forms list based controls such as the and do not directly support binding to data sources however, you can enable this scenario by binding through a . In this case, the will convert the data source to an . Simple objects Windows Forms supports data binding control properties to public properties on the instance of an object using the type. Windows Forms also supports binding list based controls, such as a to an object instance when a is used. array or collection To act as a data source, a list must implement the interface; one example would be an array that is an instance of the class. For more information on arrays, see [How to: Create an Array of Objects (Visual Basic)](https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2010/487y7874(v=vs.100)). In general, you should use when you create lists of objects for data binding. is a generic version of the interface. The interface extends the interface by adding properties, methods and events necessary for two-way data binding. Windows Forms controls can be bound to data sources that only support the interface if they are bound through a component. ADO.NET data objects ADO.NET provides a number of data structures suitable for binding to. Each varies in its sophistication and complexity. - . A is the essential building block of a , in that a number of columns comprise a table. Each has a property that determines the kind of data the column holds (for example, the make of an automobile in a table describing cars). You can simple-bind a control (such as a control's property) to a column within a data table. - . A is the representation of a table, with rows and columns, in ADO.NET. A data table contains two collections: , representing the columns of data in a given table (which ultimately determine the kinds of data that can be entered into that table), and , representing the rows of data in a given table. You can complex-bind a control to the information contained in a data table (such as binding the control to a data table). However, when you bind to a , you are a really binding to the table's default view. - . A is a customized view of a single data table that may be filtered or sorted. A data view is the data "snapshot" used by complex-bound controls. You can simple-bind or complex-bind to the data within a data view, but be aware that you are binding to a fixed "picture" of the data rather than a clean, updating data source. - . A is a collection of tables, relationships, and constraints of the data in a database. You can simple-bind or complex-bind to the data within a dataset, but be aware that you are binding to the default for the (see the next bullet point). - . A is a customized view of the entire , analogous to a , but with relations included. With a collection, you can set default filters and sort options for any views that the has for a given table. ## See also - [Change Notification in Windows Forms Data Binding](change-notification-in-windows-forms-data-binding.md) - [Data Binding and Windows Forms](data-binding-and-windows-forms.md) - [Windows Forms Data Binding](windows-forms-data-binding.md)