Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Q: dropdown list, no selected value (http://www.velocityreviews.com/forums/t100445-q-dropdown-list-no-selected-value.html)

=?Utf-8?B?SklNLkgu?= 04-12-2005 02:29 PM

Q: dropdown list, no selected value
 
I am populating dropdown list with binding dataset, and dropdown list shows
first item by default when application is launched, is there any way I can
set it be empty and let user select one?

=?Utf-8?B?S29zdGFkaW4gS29zdG92?= 04-12-2005 02:39 PM

RE: Q: dropdown list, no selected value
 
Call this in Page_Load(or some other handler):
ListItem li = new ListItem("-1", "");
myDDL.Items.InsertAt(0, li);

Regards,
Kostadin Kostov

"JIM.H." wrote:

> I am populating dropdown list with binding dataset, and dropdown list shows
> first item by default when application is launched, is there any way I can
> set it be empty and let user select one?


Eliyahu Goldin 04-12-2005 03:38 PM

Re: dropdown list, no selected value
 
You have a choice of adding an empty row to either ddl itself or to the
bound dataset.

Eliyahu

"JIM.H." <JIMH@discussions.microsoft.com> wrote in message
news:879FE8E1-A875-4A8E-B138-3FDA0C948D87@microsoft.com...
> I am populating dropdown list with binding dataset, and dropdown list

shows
> first item by default when application is launched, is there any way I can
> set it be empty and let user select one?





All times are GMT. The time now is 09:33 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.