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
|
|
|
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
|
|
|
Tags:
Developers, Data Binding, 2. Intermediate, 3. Advanced, Customization, Layouting, Pre v6.3, v6.3, v6.4 and Later
|
|
|
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
|
|
|
Tags:
Architects, Developers, Data Binding, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags:
Developers, Data Binding, Windows & Dialogs, 1. Beginner, 2. Intermediate, Customization, Data Binding, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
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
|
|
|
|