Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selecting Null in a ComboBox
Message
 
To
10/04/2008 12:11:42
Jeff Corder
Ambit Technologies, LLC
Missouri, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01309732
Message ID:
01310960
Views:
8
Jeff,

>I have a nullable column in my database and business object (Guid?). I want to bind this to a ComboBox so the user can select one of the entries or nothing.
>
>I tried checking the SelectedIndex and if it was -1 setting the SelectedValue to null - it wasn't happy.
>
>I then tried setting the BusinessObject value to null - it complained that it needed to be DBNull.Value - which I can't send to the business object.
>
>How do I use databinding to allow the user to select nothing (null) from a ComboBox?

Check out this link (under the topic "How can I add a "null" or "DBNull" entry to my bound ComboBox?":

http://windowsclient.net/blogs/faqs/rss.aspx?Tags=ComboBox&AndTags=1

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform