Skip to main content
A newer version of this page is available. .

LookUpEdit Class

Represents a lookup editor.

Namespace: DevExpress.Xpf.Grid.LookUp

Assembly: DevExpress.Xpf.Grid.v19.1.dll

Declaration

public class LookUpEdit :
    LookUpEditBase

Remarks

This a multi-column combo box that provides the lookup functionality using an embedded DXGrid control for WPF.

LookUpEdit

Its features include:

Lookup Editor can be used both as a standalone editor as well as an in-place editor within the DXGrid Control.

Example

This example shows how to customize the DXGrid Control displayed within the Lookup editor's popup window.Note: the embedded DXGrid name must be set to PART_GridControl.

<Window x:Class="HowToCreateLookUpEdit.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525"
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
        xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
        xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core">
    <Grid>
        <dxg:LookUpEdit Name="lookUpEdit1"
                        DisplayMember="ProductName"
                        ValueMember="ID"
                        AutoPopulateColumns="False"
                        AutoComplete="True"
                        IncrementalFiltering="True"
                        ImmediatePopup="True"
                        IsPopupAutoWidth="False"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Top"
                        Width="200" Margin="10">
            <dxg:LookUpEdit.PopupContentTemplate>
                <ControlTemplate>
                    <dxg:GridControl Name="PART_GridControl">
                        <dxg:GridControl.Columns>
                            <dxg:GridColumn FieldName="ProductName" />
                            <dxg:GridColumn FieldName="UnitPrice" />
                            <dxg:GridColumn FieldName="Quantity" />
                        </dxg:GridControl.Columns>
                        <dxg:GridControl.View>
                            <dxg:TableView AutoWidth="True" />
                        </dxg:GridControl.View>
                    </dxg:GridControl>
                </ControlTemplate>
            </dxg:LookUpEdit.PopupContentTemplate>
        </dxg:LookUpEdit>
    </Grid>
</Window>

The following code snippets (auto-collected from DevExpress Examples) contain references to the LookUpEdit class.

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.

See Also