469,644 Members | 1,746 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,644 developers. It's quick & easy.

drop down list problems

SAL
Hello,
is there a way to get this webcontrol to behave more like its winform
cousin?
In a winform dropdown, you can set the SelectedIndex to -1 and no items will
be showing in the drop list. This doesn't seem to work with the web control.
This bring up the issue of the first item in the list being displayed after
adding items to the drop down. However, you cause the SelectedIndexChanged
event you'd have to select a different item and then come back to the first
item to get the selectedindexchanged to fire for the first item in the list.
Is there a way around these couple of issues? I'm very new to ASP.NET stuff.

Thanks
S
Dec 19 '06 #1
3 1155
Would adding a blank item at the top solve your problem?

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"SAL" <SA**@NoNo.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hello,
is there a way to get this webcontrol to behave more like its winform
cousin?
In a winform dropdown, you can set the SelectedIndex to -1 and no items
will be showing in the drop list. This doesn't seem to work with the web
control. This bring up the issue of the first item in the list being
displayed after adding items to the drop down. However, you cause the
SelectedIndexChanged event you'd have to select a different item and then
come back to the first item to get the selectedindexchanged to fire for
the first item in the list. Is there a way around these couple of issues?
I'm very new to ASP.NET stuff.

Thanks
S
Dec 19 '06 #2
SAL
Hmmm, that's awfully simple Karl. Let me see.... :)

S

"Karl Seguin" <ka********@removeopenmymindremovemetoo.andmenetwr ote in
message news:%2****************@TK2MSFTNGP03.phx.gbl...
Would adding a blank item at the top solve your problem?

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"SAL" <SA**@NoNo.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Hello,
is there a way to get this webcontrol to behave more like its winform
cousin?
In a winform dropdown, you can set the SelectedIndex to -1 and no items
will be showing in the drop list. This doesn't seem to work with the web
control. This bring up the issue of the first item in the list being
displayed after adding items to the drop down. However, you cause the
SelectedIndexChanged event you'd have to select a different item and then
come back to the first item to get the selectedindexchanged to fire for
the first item in the list. Is there a way around these couple of issues?
I'm very new to ASP.NET stuff.

Thanks
S

Dec 19 '06 #3
I'd suggest to also set your 'value' to -1, especially if queries using the
items are based on a numeric value

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"SAL" <SA**@NoNo.comwrote in message
news:ex**************@TK2MSFTNGP03.phx.gbl...
Hmmm, that's awfully simple Karl. Let me see.... :)

S

"Karl Seguin" <ka********@removeopenmymindremovemetoo.andmenetwr ote in
message news:%2****************@TK2MSFTNGP03.phx.gbl...
Would adding a blank item at the top solve your problem?

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"SAL" <SA**@NoNo.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hello,
is there a way to get this webcontrol to behave more like its winform
cousin?
In a winform dropdown, you can set the SelectedIndex to -1 and no items
will be showing in the drop list. This doesn't seem to work with the
web
control. This bring up the issue of the first item in the list being
displayed after adding items to the drop down. However, you cause the
SelectedIndexChanged event you'd have to select a different item and
then
come back to the first item to get the selectedindexchanged to fire for
the first item in the list. Is there a way around these couple of
issues?
I'm very new to ASP.NET stuff.

Thanks
S


Dec 19 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Yoshitha | last post: by
2 posts views Thread by Joey Liang via DotNetMonster.com | last post: by
6 posts views Thread by mcgrew.michael | last post: by
4 posts views Thread by TycoonUK | last post: by
4 posts views Thread by jack.vier | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.