472,125 Members | 1,452 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,125 software developers and data experts.

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 1214
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 Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.