Search KB Filter article types
Multicolumn Combo Box with Auto Select
This article demonstrates how to create a multicolumn combo box with rudimentary auto-select.
Categories: Lists & Grids, Skinnable and Inherited Controls, Non-ORM
Tags: Developers, Data Binding, C#, 1. Beginner, 2. Intermediate, 3. Advanced, Customization, Data Binding, v6.3, v6.4 and Later
Revision: 1
Posted: 20/Sep/2010
Updated: 26/Sep/2010
Status: Publish
Types: Code

The multicolumn combo box is actually a user control containing a combo box with a text box superimposed on top.

The custom drop down uses the data grid view control.

Two search strategies are presented
• Find First – The first item matching the typed text is selected in the drop down
• Suggest – The data is filtered so that the drop down only contains data beginning with the typed text.

In Suggest mode there are two options
• Type the text and then press enter to apply the filter and display the drop down
• The drop down appears with the first key press and the data is filtered as you go.

Note with the latter option the drop down does not resize correctly (it should in theory but does not in practice). Using the enter key to apply the filter always results in a correct resize and uses the same code.

The Combo uses a data view as its data source as in practice many users will use the same list which can be held in a global table, available to all users by virtue of a static declaration. Often the same data set needs presenting in different ways, within the application, which can be achieved by using different data views.
In fact when you use a table as a data source you are connecting to it via its default data view property.

A possible extension could be the addition of a not in the list event.
The application was tested on IE 8 and relies on 6.4 beta e onwards.

To use the project you will need to
1) Have the Northwind database on SQL Server
2) Edit the web config file with your connection string

About the author

Related Articles

Lists & Grids  
Title Update Author
I played a bit around with the new 6.4 ListView control, its quite amazing what you can do with it. It opens a lot of new ways to present data in a better and more userfriendly way.
Tags: Architects, Developers, Data Binding, C#, 2. Intermediate, 3. Advanced, Customization, Data Binding, v6.4 and Later
02/July/2012    2012/07/02
Tags: Developers, Data Binding, 2. Intermediate, 3. Advanced, Customization, Layouting, Pre v6.3, v6.3, v6.4 and Later
05/Jan/2009    2009/01/05
Tags: Developers, Data Binding, Navigation, 1. Beginner, 2. Intermediate, Data Binding, Navigation, ASP.NET, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
11/Jan/2009    2009/01/11
Tags: Architects, Developers, Data Binding, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
11/Jan/2007    2007/01/11
Tags: Developers, Data Binding, Windows & Dialogs, 1. Beginner, 2. Intermediate, Customization, Data Binding, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
03/Jan/2009    2009/01/03
The DataListView control is an extension to the Visual WebGui ListView. It inherits from the Visual WebGui ListView control and adds DataSource/DataMemeber support to provide a DataGridView behavior in terms of data population.
Tags: Developers, Data Binding, 1. Beginner, 2. Intermediate, 3. Advanced, Data Binding, Pre v6.3
06/Jan/2007    2007/01/06
.NET HTML5 Web, Cloud and Mobile application delivery | Sitemap | Terms of Use | Privacy Statement | Copyright © 2005-2012 Visual WebGui®       Visual WebGui weblog on ASP.NET Gizmox Blog Visual WebGui Group on LinkedIn Visual WebGui updates on Twitter Visual WebGui Page on Facebook Visual WebGui YouTube Channel Visual WebGui Platform News RSS