9. September 2007 16:04
** Updated, October 4th 2007 -- See bottom for change list
It seems there is a large void out there for simple asp controls which provide multi-select combo box functionality.
I spent quite a while searching, and couldn't find anything free that worked well, (or even any good looking non-free controls) so I created my own.
I've created a custom web control, derived from a combobox, which supports databinding, and can easily be dropped onto your page in place of a normal drop down box. The main difference being that mine has checkboxes next to each list item, and returns the text value as a delimited list of selected items.
The screen shot is taken from IE7 in Vista, and the page is being rendered in Quirks mode (Transitional actually, the asp2.0 default)
There are some irritating hurdles to overcome matching the look between quirks and strict mode rendering, as of now, the best solution I have is a design-time boolean property to choose, I'll implement this in the coming days.
Here's a shot in design view, showing databinding support:
Currently IE6 and IE7 render properly in quirks mode.
How do I get it?
Well, first, you have to remember that this is an early proof-of-concept design, and all the nice features will be ready later! With that in mind:
Grab the binary - All the scripts/image are embedded resources.
Grab the VS2005 project with sample - Excuse the mess of code for a few more weeks!
Please comment here if you find this useful, or make any enhancements, and let me know what you see missing! I'll be flushing out the more obvious features in the coming weeks, such as more theming support, better firefox support, etc.
If you'd like to use this for any corporate/commercial purposes, get in touch with me first!
- No property to change delimiter
- Fixed border styling doesn't match default vista rendering of text boxes
- Can't change drop down image
New Version! (links above are up-to-date)
Updated October 5th, 2007
- Ability to set maximum height of drop down box. Anything past this height is displayed via scrolling. This determines how many check boxes are shown before scrolling is enabled. Use the MaxDropDownHeight property.
- Code cleaned up slightly, with some comments added.
Updated September 17th, 2007
- Enable AutoPostBack works. You can catch the selected-index-changed event. Your not actually catching a new selected index, but you can get the new text value in the event. This works even if you have several instances of the control on your page.
- Added public property: "TransitionalMode". If enabled, the control renders properly in XHTML Transitional Doctype, (standard), if disabled, it renders properly in quirks mode. Basically, if it seems to be rendering wrong, change this property.
- Added scrollbars to drop-down pane if too many options are present.
Grab the binary
Grab the VS2005 project with sample