Back to Devexpress

LookUpEdit.StyleSettings Property

wpf-devexpress-dot-xpf-dot-grid-dot-lookup-dot-lookupedit-739abf69.md

latest9.0 KB
Original Source

LookUpEdit.StyleSettings Property

Gets or sets an object that defines the appearance and behavior of the LookUpEdit.

Namespace : DevExpress.Xpf.Grid.LookUp

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
[Browsable(true)]
public BaseEditStyleSettings StyleSettings { get; set; }
vb
<Browsable(True)>
Public Property StyleSettings As BaseEditStyleSettings

Property Value

TypeDescription
BaseEditStyleSettings

A BaseEditStyleSettings descendant that defines the appearance and behavior of the LookUpEdit.

|

Remarks

Operation Modes

You can fine-tune a lookup editor by using the BaseEdit.StyleSettings property. This property allows you to alter the appearance and behavior of a lookup editor by adding extra features like searching and multiple item selection. To apply specific settings, assign the lookup’s BaseEdit.StyleSettings property to one of the objects listed in the table below.

|

LookUpEdit mode

|

Corresponding settings object

|

Description

| | --- | --- | --- | |

LookUpEdit

|

LookUpEditStyleSettings

|

Editor’s dropdown displays a grid. This is a default setting.

| |

SearchLookUpEdit

|

SearchLookUpEditStyleSettings

|

Editor’s dropdown displays a grid and a search box.

| |

MultiSelectLookUpEdit

|

MultiSelectLookUpEditStyleSettings

|

Editor’s dropdown displays a grid that allows you to select multiple items.

| |

TokenLookUpEdit

|

TokenLookUpEditStyleSettings

|

Editor’s dropdown displays a grid that allows you to select multiple items.

Selected items appear as tokens.

| |

SearchTokenLookUpEdit

|

SearchTokenLookUpEditStyleSettings

|

Editor’s dropdown displays a grid and a search box. Allows multiple item selection.

Selected items appear as tokens.

|

Each of the settings objects has a number of properties that you can use to enable or disable the following grid features.

The following code example shows a lookup editor in SearchLookUp mode with the grouping feature disabled:

xaml
<dxg:LookUpEdit>
    <dxg:LookUpEdit.StyleSettings>
        <dxg:SearchLookUpEditStyleSettings AllowGrouping="False"/>
    </dxg:LookUpEdit.StyleSettings>
</dxg:LookUpEdit>

The following sections describe different settings provided by the LookUpEdit control in detail.

LookUpEdit Operation Mode

LookUpEdit mode is used by default.

The editor’s dropdown displays a fully-functional grid that supports the following features:

  • Single item selection
  • Data filtering
  • Data grouping
  • Data sorting

To learn more, see LookUpEditStyleSettings.

SearchLookUpEdit Operation Mode

In addition to LookUpEdit features, SearchLookUpEdit displays a search box.

To learn more, see SearchLookUpEditStyleSettings.

MultiSelectLookUpEdit Operation Mode

In addition to the standard features, MultiSelectLookUpEdit supports multiple item selection.

To learn more, see MultiSelectLookUpEditStyleSettings.

TokenLookUpEdit Operation Mode

TokenLookupEdit mode is inspired by modern mail clients.

In addition to the standard features, TokenLookupEdit supports the following:

  • Multiple item selection
  • Selected items appear as tokens

To learn more, see TokenLookUpEditStyleSettings.

SearchTokenLookUpEdit Operation Mode

SearchTokenLookupEdit mode is inspired by modern mail clients.

In addition to LookUpEdit features, SearchTokenLookupEdit supports the following:

  • Data search
  • Multiple item selection
  • Selected items appear as tokens

To learn more, see SearchTokenLookUpEditStyleSettings.

LookUpEdit Operation Mode Comparison

The table below compares the features of different LookUpEdit operation modes.

GroupingFilteringSortingSingle Item SelectionMultiple Item Selection[1]SearchTokensText Editing
LookUpEdit
SearchLookUpEdit
MultiselectLookUpEdit
TokenLookUpEdit
SearchTokenLookUpEdit

Example : How to: Create a SearchLookUpEdit and Bind it to Data

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the StyleSettings 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.

wpf-pivot-grid-implement-a-custom-filter-popup/CS/DXPivotGrid_CustomFilterPopup/MainWindow.xaml#L27

xml
Template="{dxci:ThemeResource {dxpgi:FieldHeaderThemeKey ResourceKey=FilterButtonTemplate}}">
<local:PivotGridCustomFilter.StyleSettings>
    <dxg:SearchLookUpEditStyleSettings SelectionMode="Multiple" />

Footnotes

  1. Refer to the following help topic for more information: Multiple Selection in ComboBoxEdit, LookUpEdit, and ListBoxEdit.

See Also

LookUpEdit Class

LookUpEdit Members

DevExpress.Xpf.Grid.LookUp Namespace