PC Review


Reply
Thread Tools Rate Thread

Add blank item in databound ComboBox

 
 
Benny
Guest
Posts: n/a
 
      18th Jan 2007
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!

 
Reply With Quote
 
 
 
 
Bob Graham
Guest
Posts: n/a
 
      18th Jan 2007

How about:

Union All

Select ''

In your select query? Unless it's numeric.

Bob

-----Original Message-----
From: Benny [private.php?do=newpm&u=]
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!

 
Reply With Quote
 
Robert May
Guest
Posts: n/a
 
      18th Jan 2007
Before binding to the datasource, add a new row to the datasource that has
the blank value in it. Then bind.

Robert

"Benny" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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!
>



 
Reply With Quote
 
Benny
Guest
Posts: n/a
 
      19th Jan 2007
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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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!
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataGridView ComboBox column with databound item list sklett Microsoft C# .NET 3 5th Sep 2006 11:08 PM
How do I add a blank item to a combobox that is databound to a dataset? Johann Blake Microsoft C# .NET 6 22nd Sep 2005 05:54 AM
Synch DataBound ComboBox John Smith Microsoft C# .NET 0 8th Jun 2005 11:46 PM
DataBound ComboBox Dave Microsoft Dot NET Framework Forms 4 10th Jun 2004 03:36 PM
Databound combobox jan v Microsoft C# .NET 2 20th Aug 2003 08:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:29 PM.