Back to Devexpress

LookUpEditSettingsBase.ItemsSource Property

wpf-devexpress-dot-xpf-dot-editors-dot-settings-dot-lookupeditsettingsbase-a602c097.md

latest4.9 KB
Original Source

LookUpEditSettingsBase.ItemsSource Property

Gets or sets the LookUpEdit‘s data source. This is a dependency property.

Namespace : DevExpress.Xpf.Editors.Settings

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public object ItemsSource { get; set; }
vb
Public Property ItemsSource As Object

Property Value

TypeDescription
Object

An object that represents the data source from which the LookUpEdit retrieves its data.

|

Remarks

The LookUpEdit cannot operate without a data source. It can be bound to data from a database, from an XML file or to any data created at runtime. The grid can be bound to any object that implements the IEnumerable interface or its descendant (e.g., IList, ICollection). To bind a grid, you should assign a data source to the ItemsSource property. Note that the LookUpEdit cannot be bound at design-time - only at runtime.

To learn more, see Binding to Data Overview.

The following code snippets (auto-collected from DevExpress Examples) contain references to the ItemsSource 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.

how-to-bind-wpf-grid-to-data/CS/ViewModel/XPO/InstantFeedbackMode/MainWindow.xaml#L21

xml
<dxe:ComboBoxEditSettings DisplayMember="Name" ValueMember="Id"
                              ItemsSource="{Binding Users}" />
</dxg:GridColumn.EditSettings>

wpf-data-grid-implement-crud-operations/CS/ViewModel/XPO/ServerMode/MainWindow.xaml#L38

xml
<dxe:ComboBoxEditSettings DisplayMember="Name" ValueMember="Id"
                              ItemsSource="{Binding Users}" />
</dxg:GridColumn.EditSettings>

wpf-data-grid-filter-column-lookupedit-based-on-value-in-another-column/CS/MainWindow.xaml#L16

xml
<dxg:GridColumn.EditSettings>
    <dxg:LookUpEditSettings ItemsSource="{Binding Countries}" ValueMember="CountryId" DisplayMember="CountryName" />
</dxg:GridColumn.EditSettings>

wpf-data-grid-bind-columns-to-viewmodel-collection/CS/ColumnsSample/MainWindow.xaml#L22

xml
<dxg:GridColumn.EditSettings>
    <dxe:ComboBoxEditSettings ItemsSource="{Binding Source}"/>
</dxg:GridColumn.EditSettings>

how-to-bind-to-grpc/CS/InfiniteAsyncSource.GRPC/MainWindow.xaml#L33

xml
<dxg:GridColumn.EditSettings>
  <dxe:ComboBoxEditSettings ItemsSource="{Binding Users}" ValueMember="Id" DisplayMember="FullName" IsTextEditable="False"/>
</dxg:GridColumn.EditSettings>

wpf-create-a-ribboncontrol/CS/RibbonControl_Ex/MainWindow.xaml.cs#L31

csharp
bFileName.Content = "Document 1";
((ComboBoxEditSettings)eFontSize.EditSettings).ItemsSource = (new FontSizes()).Items;
InitializeFontFamilyGallery();

See Also

LookUpEditSettingsBase Class

LookUpEditSettingsBase Members

DevExpress.Xpf.Editors.Settings Namespace