Back to Devexpress

ObjectDataSource Class

corelibraries-devexpress-dot-dataaccess-dot-objectbinding.md

latest6.0 KB
Original Source

ObjectDataSource Class

Enables binding data-aware controls and components to a runtime-created object or an instance method.

Namespace : DevExpress.DataAccess.ObjectBinding

Assembly : DevExpress.DataAccess.v25.2.dll

NuGet Package : DevExpress.DataAccess

Declaration

csharp
[ToolboxBitmap(typeof(ObjectDataSource), "ObjectDataSource.bmp")]
public class ObjectDataSource :
    DataComponentBase,
    ITypedList,
    IList,
    ICollection,
    IEnumerable,
    IListAdapter,
    IDataComponent,
    IComponent,
    IDisposable,
    ISupportInitialize,
    IBindingList,
    IDynamicLookupSettingsDataProvider
vb
<ToolboxBitmap(GetType(ObjectDataSource), "ObjectDataSource.bmp")>
Public Class ObjectDataSource
    Inherits DataComponentBase
    Implements ITypedList,
               IList,
               ICollection,
               IEnumerable,
               IListAdapter,
               IDataComponent,
               IComponent,
               IDisposable,
               ISupportInitialize,
               IBindingList,
               IDynamicLookupSettingsDataProvider

Remarks

Overview

The ObjectDataSource is a data component much like the standard .NET BindingSource component.

The ObjectDataSource component has the following advantages over BindingSource :

  • It can bind to methods that return a collection of custom objects.
  • It can bind to parameterized object constructors.
  • Since it is a cross-platform component, your project does not need the System.Windows.Forms assembly.

Note

The Object Data Source displays only public non-static properties in the Field List.

Refer to the following help topic for examples of use: Use ObjectDataSource.

Data Source for Controls and Components

The following help topics decribe how to use the ObjectDataSource to supply DevExpress controls/components with data:

You can use the Data Source Wizard to bind a component to an Object Data Source. To make a particular assembly, class, or member appear in the Data Source Wizard, use the following attributes: HighlightedAssemblyAttribute, HighlightedClassAttribute, and HighlightedMemberAttribute.

ObjectDataSource Properties

The following properties are used to bind the ObjectDataSource to data.

Implements

IDataComponent

Inheritance

Object MarshalByRefObject Component DataComponentBase ObjectDataSource DashboardObjectDataSource

See Also

How to Create the Data Access Library Data Sources at Runtime

ObjectDataSource Members

Connect to an Object Data Source

Bind a Report to an Object Data Source

WinForms Dashboard - Object Data Source

Web Dashboard - Object Data Source

DevExpress.DataAccess.ObjectBinding Namespace