Back to Devexpress

XPBindingSource.ObjectClassInfo Property

xpo-devexpress-dot-xpo-dot-xpbindingsource-85bc7298.md

latest3.0 KB
Original Source

XPBindingSource.ObjectClassInfo Property

Gets or sets the XPClassInfo metadata that describes the type of items the data source contains.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
[DefaultValue(null)]
public XPClassInfo ObjectClassInfo { get; set; }
vb
<DefaultValue(Nothing)>
Public Property ObjectClassInfo As XPClassInfo

Property Value

TypeDefaultDescription
XPClassInfonull

Metadata that relates to the data source the XPBindingSource uses.

|

Remarks

Set the Dictionary or the ObjectClassInfo property manually when the XPBindingSource uses collections that do not implement the IXPDictionaryProvider interface.

Refer to the DataSource article for additional information on data sources and related limitations.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ObjectClassInfo property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XPO_how-to-bind-data-to-winforms-controls-using-xpbindingsource/CS/DXApplication/Form1.cs#L63

csharp
ProductListSource.DataSource = UnitOfWork.Query<Products>().ToList();
ProductListSource.ObjectClassInfo = UnitOfWork.GetClassInfo<Products>();
break;

XPO_how-to-bind-data-to-winforms-controls-using-xpbindingsource/VB/DXApplication/Form1.vb#L52

vb
ProductListSource.DataSource = UnitOfWork.Query(Of Products)().ToList()
    ProductListSource.ObjectClassInfo = UnitOfWork.GetClassInfo(Of Products)()
Case "Single Object"

See Also

XPBindingSource Class

XPBindingSource Members

DevExpress.Xpo Namespace