472,125 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 software developers and data experts.

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 4601

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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.