Back to Devexpress

XPBindingSource.Dictionary Property

xpo-devexpress-dot-xpo-dot-xpbindingsource.md

latest3.4 KB
Original Source

XPBindingSource.Dictionary Property

Gets or sets an XPDictionary.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
[Browsable(false)]
public XPDictionary Dictionary { get; set; }
vb
<Browsable(False)>
Public Property Dictionary As XPDictionary

Property Value

TypeDescription
XPDictionary

An XPDictionary the XPBindingSource uses to get XPClassInfo metadata from the type of the data source’s items.

|

Remarks

The XPBindingSource uses the XPDictionary to get XPClassInfo metadata from the type of the data source‘s items. 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 Dictionary 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#L75

csharp
CategoryListSource.DataSource = UnitOfWork.Query<Categories>().OrderBy(t => t.CategoryName).ToList();
CategoryListSource.Dictionary = UnitOfWork.Dictionary;
SupplierListSource.DataSource = new XPCollection<Suppliers>(UnitOfWork, null, new SortProperty("CompanyName", SortingDirection.Ascending));

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

vb
CategoryListSource.DataSource = UnitOfWork.Query(Of Categories)().OrderBy(Function(t) t.CategoryName).ToList()
CategoryListSource.Dictionary = UnitOfWork.Dictionary
SupplierListSource.DataSource = New XPCollection(Of Suppliers)(UnitOfWork, Nothing, New SortProperty("CompanyName", SortingDirection.Ascending))

See Also

XPBindingSource Class

XPBindingSource Members

DevExpress.Xpo Namespace