Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default to blank in ASP.Net dropdown list
Message
From
21/07/2006 15:04:49
 
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
Miscellaneous
Thread ID:
01138622
Message ID:
01138690
Views:
11
Kevin,

>The only way I've ever been able to do this, is to insert an entry after I do the data binding:
>
>        this.cboMyPulldown.Items.Insert(0,"<Please make selection>");
>
There is another. :-) I just ran across this one last night -- you can declare a default list item at the top of the list in design mode and then set the dropdown's AppendDataBoundItems property to True so it leaves your existing item there and adds the databound items after it. I have not yet tried programmatically adding a default item, setting the property and then databinding, but it would probably work, too.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform