469,332 Members | 6,612 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,332 developers. It's quick & easy.

Add blank item in databound ComboBox

Does anyone know how I would go about adding a blank value to the list
of items in a ComboBox that has a set datasource? Thank in advance!

Jan 18 '07 #1
3 4529

How about:

Union All

Select ''

In your select query? Unless it's numeric.

Bob

-----Original Message-----
From: Benny [mailto:be***********@gmail.com]
Posted At: Thursday, January 18, 2007 9:03 AM
Posted To: microsoft.public.dotnet.languages.csharp
Conversation: Add blank item in databound ComboBox
Subject: Add blank item in databound ComboBox

Does anyone know how I would go about adding a blank value to the list
of items in a ComboBox that has a set datasource? Thank in advance!

Jan 18 '07 #2
Before binding to the datasource, add a new row to the datasource that has
the blank value in it. Then bind.

Robert

"Benny" <be***********@gmail.comwrote in message
news:11**********************@38g2000cwa.googlegro ups.com...
Does anyone know how I would go about adding a blank value to the list
of items in a ComboBox that has a set datasource? Thank in advance!

Jan 18 '07 #3
Thank you very much. This worked :)

Robert May wrote:
Before binding to the datasource, add a new row to the datasource that has
the blank value in it. Then bind.

Robert

"Benny" <be***********@gmail.comwrote in message
news:11**********************@38g2000cwa.googlegro ups.com...
Does anyone know how I would go about adding a blank value to the list
of items in a ComboBox that has a set datasource? Thank in advance!
Jan 19 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by jan v | last post: by
5 posts views Thread by Steve B. | last post: by
4 posts views Thread by =?Utf-8?B?SmFtZXMgR2V1cnRz?= | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.