The Dink Network

Reply to Databinding in Visual Studio

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
January 18th 2012, 04:07 AM
dinkdead.gif
Before I go and sign up in some other forum to ask my silly questions, I wonder if there are any .NET programmers lurking around here that can help me?

Does anyone know how I can set a default value on a databound combobox? For example, I've bound a combobox to a database with a list of book authors and want the box to say "Select author..." when the form is first loaded.

The closest I can get is to do
comboAuthors.SelectedIndex = -1

and get a blank entry as default. Can't manage to get any text in there though.