A newer version of this page is available. Switch to the current version.

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.

Examples

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>
See Also