News

WinForms Lookup Controls – Which Lookup to Use in Your Next WinForms Project

Whether used on a standalone basis or within container controls such as our WinForms Grid or TreeList, lookups are indispensable. Over the years, we’ve created numerous lookups to help you address a wide range of usage scenarios. The purpose of this post is to clarify some of the questions we receive about lookups and hopefully explain the purpose behind the lookup controls included within our WinForms subscription.

WinForms Lookup Controls on Toolbox

Before I describe each control individually, I’ll first focus on the similarities between each DevExpress Lookup control.

Data Source Types

All DevExpress Lookups support the same range of available data source types: from simple List and Array objects to remote data sources running on a web-server. For a complete list, please refer to documentation.

Cascading Record Selection

All DevExpress Lookups support a CascasdingOwner property. As its name implies, this feature allows individual lookups to serve as filters for one another. The following animation demonstrates the value of this property.

Cascading WinForms Lookup Controls

Display and Key Members

All DevExpress Lookups allow you to specify different data source fields for Key (values that identify business objects) and Display (values visible to end-users when they select drop-down items) members. For example, in the animation above, the first lookup displays "CategoryID\CategoryName" value pairs. CategoryID is the Key Member needed for cascading record selection and CategoryName is used for display purposes.

Inserting New Records/Values

At their core, all DevExpress lookups are text boxes with a “linked” dropdown menu. Based on business needs, you can put this text box to a good use and allow users to enter new values at any time. For more information on adding records using the lookup’s text field, please refer to documentation.

WinForms Lookup Controls - Add New Values

Unbound Records/Values

All DevExpress Lookups allow you to display/use unbound values. Though the exact implementation for each lookup differs slightly, you are in total control when using our lookups in unbound mode – you can even mix bound/unbound values as needs dictate.

Resizable Dropdown Windows

To help improve visibility across screen resolutions and remove constraints associated with the dimensions of the control itself, all but one of our Lookups allow end-users to resize “linked” dropdown windows.

Choosing the Right Lookup Control for Your Next WinForms Project

Now that I’ve described the similarities between our lookups, I’ll focus on each lookup individually and offer you a few use-cases that should help you decide which control to use in your next desktop app.

Standard Lookup Edit (LookUpEdit)

The first lookup I’ll discuss is our venerable LookUpEdit - a lightweight lookup with a simple table layout. Its power lies in its simplicity and we suggest that it be used when you need to display straightforward lookup info (no images, no need for search or advanced capabilities).

WinForms Lookup Controls - LookUpEdit

Grid-based Lookup Edit (GridLookUpEdit)

The next control on our list is our Grid-based Lookup. As its name implies, this control uses our WinForms Data Grid within its “linked” dropdown. The functionality available to you when using this lookup is nearly endless (display multiple columns, display images, sort against multiple column values, apply filters, etc).

WinForms GridView Lookup Control

Among the features that differentiates our Grid-based Lookup from our standard lookup is its ability to visualize lookup data. The default View used within the dropdown is our standard Grid View. By using its PopupViewType property, you can add bands to the default tabular layout (you can select between Banded and Advanced Banded Views), or utilize the Tile View when application needs warrant.

WinForms Banded GridView Lookup Control WinForms Adv Banded GridView Lookup Control

By using the Grid-based Lookup’s Tile View, you can improve usability when lookup records include important images (images that require emphasis). The Tile View allows you to manually build templates to highlight important content.

WinForms Tile View Lookup Control - Cards WinForms Tile View Lookup Control - Textures

TreeList-based Lookup Edit (TreeListLookUpEdit)

Our TreeLIst-based Lookup is displays a TreeList within its dropdown. It’s been designed to allow users to select values from a tree-like hierarchy. This is definitely a specialized control and was designed for users that need to simplify record selection from hierarchical lists.

WinForms TreeList Lookup Control

Lookup with Integrated Search (SearchLookUpEdit)

The next lookup I want to highlight is our SearchLookUpEdit control – a Grid-based lookup with an embedded Find Panel. As its name implies, this lookup simplifies record selection by allowing users to filter records displayed within the dropdown(the control highlights matching results and supports delayed auto-search mode for optimal performance).

WinForms Search Lookup Control

Image ComboBox (ImageComboBoxEdit)

This lightweight lookup is suitable for use when you must display a limited number of unique values. You can supply images for each lookup item and can easily populate the control at runtime - no need to have a data source attached. Includes Enumeration support.

WinForms Image Combo Box Editor

Published Nov 28 2017, 11:40 AM by
Filed under: , ,
Bookmark and Share

Comments

Justin McGuirk

Great post!

I will definitely be converting at least one of our standard lookups to a tree lookup because of this.

November 29, 2017 6:52 AM

Joe Goodall

Looks like I have learnt something new today! I never knew that 'Cascading Record Selection' was a feature.

December 2, 2017 3:48 AM
LIVE CHAT

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, ASP.NET, WinForms, HTML5 or Windows 10, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2017 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners