DropDown SelectedIndexChange event only fires when ListItem value changes

R

Randy

I have a dropdown box on an aspx page. I have about 20
ListItems (added by setting dropdown.datasource =
dataset). 10 of them have a value of 0, the others have a
value of 1. I have code in the
dropdown.SelectedIndexChange event. This event seems to
only fire when the value of the selected item is
different from the value of the previously selected item.
This should be firing when the selected item's index is
changed which should be on every different selection. Is
this a bug in the dropdown box, or am i doing something
wrong. I can provide an example if necessary. This is
something that needs to be in production very soon. I
would appreciate any help I can get.

Thanx in advance. Randy.
 
J

Jeffrey Tan[MSFT]

Hi Randy,

Thank you for posting in this group.

I have reproduced your problem.
It is an already known issue.
To work around your problem, I think you should use different value to your
dropdownlist. I think it make no sense of different values when the 2 items
have the
same values.

If you have any good suggestion to our products, please contact:
(e-mail address removed)
or you can visit:
http://register.microsoft.com/mswish/suggestion.asp

Again, thanks for you information.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Randy" <[email protected]>
| Sender: "Randy" <[email protected]>
| Subject: DropDown SelectedIndexChange event only fires when ListItem
value changes
| Date: Wed, 10 Sep 2003 11:28:08 -0700
| Lines: 15
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcN3yUif4j+yMBy0TtiST6Ap195D3A==
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:14544
| NNTP-Posting-Host: TK2MSFTNGXA09 10.40.1.161
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
|
| I have a dropdown box on an aspx page. I have about 20
| ListItems (added by setting dropdown.datasource =
| dataset). 10 of them have a value of 0, the others have a
| value of 1. I have code in the
| dropdown.SelectedIndexChange event. This event seems to
| only fire when the value of the selected item is
| different from the value of the previously selected item.
| This should be firing when the selected item's index is
| changed which should be on every different selection. Is
| this a bug in the dropdown box, or am i doing something
| wrong. I can provide an example if necessary. This is
| something that needs to be in production very soon. I
| would appreciate any help I can get.
|
| Thanx in advance. Randy.
|
 
R

Randy Paez

well jeff. I am actually using the dropdown creatively. I have a
MgmtApproval flag in the database that is either 0 or 1. It is
associated with text. When the user selects a certain text, i want to
know if it requires MgmtApproval. So i through that value into the
listitem value. In any case, It would make much more sense to change the
index when the index changes.
 
J

Jeffrey Tan[MSFT]

Hi Randy,

How can the costomer that use your application distinguish these
items that have the same text but not have the same flag?

If the user can not distinguish the index, I think your logic make no
sense...

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: Randy Paez <[email protected]>
| References: <[email protected]>
| X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
| Subject: RE: DropDown SelectedIndexChange event only fires when ListItem
value changes
| Mime-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
| Date: Thu, 11 Sep 2003 07:53:37 -0700
| NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:14572
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
|
|
|
| well jeff. I am actually using the dropdown creatively. I have a
| MgmtApproval flag in the database that is either 0 or 1. It is
| associated with text. When the user selects a certain text, i want to
| know if it requires MgmtApproval. So i through that value into the
| listitem value. In any case, It would make much more sense to change the
| index when the index changes.
|
|
| Don't just participate in USENET...get rewarded for it!
|
 
J

Jeffrey Tan[MSFT]

HI Randy,

I found that I seemed misunderstand your meaning.

I think you mean that the Drop-Down list have the same value but with
different text, so the
customer use your application can differ one item from another.

First, sorry for misunderstanding you.
But at this time, I think the selectedindexchange logic make no sense to
you, because the
value of different items are the same, you can not do certain actions on
any item(because you can
not distinguish), so the SelectedIndexChange event is based on different
value.

I think what you care is also of value, it is strange that when text
changes
SelectedIndexChange event does not fire, but I think this is not the main
concern.

You can give this suggestion to:
http://register.microsoft.com/mswish/suggestion.asp

or E-mail to:
(e-mail address removed)

At last, thanks for your posting.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| X-Tomcat-ID: 11883405
| References: <[email protected]>
<[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: (e-mail address removed) (Jeffrey Tan[MSFT])
| Organization: Microsoft
| Date: Mon, 15 Sep 2003 08:47:42 GMT
| Subject: RE: DropDown SelectedIndexChange event only fires when ListItem
value changes
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
| Lines: 45
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.aspnet.webcontrols:14600
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
|
| Hi Randy,
|
| How can the costomer that use your application distinguish these
| items that have the same text but not have the same flag?
|
| If the user can not distinguish the index, I think your logic make no
| sense...
|
| Best regards,
| Jeffrey Tan
| Microsoft Online Partner Support
| Get Secure! - www.microsoft.com/security
| This posting is provided "as is" with no warranties and confers no rights.
|
| --------------------
| | From: Randy Paez <[email protected]>
| | References: <[email protected]>
| | X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
| | Subject: RE: DropDown SelectedIndexChange event only fires when
ListItem
| value changes
| | Mime-Version: 1.0
| | Content-Type: text/plain; charset="us-ascii"
| | Content-Transfer-Encoding: 7bit
| | Message-ID: <[email protected]>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontrols
| | Date: Thu, 11 Sep 2003 07:53:37 -0700
| | NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
| | Lines: 1
| | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.framework.aspnet.webcontrols:14572
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontrols
| |
| |
| |
| | well jeff. I am actually using the dropdown creatively. I have a
| | MgmtApproval flag in the database that is either 0 or 1. It is
| | associated with text. When the user selects a certain text, i want to
| | know if it requires MgmtApproval. So i through that value into the
| | listitem value. In any case, It would make much more sense to change the
| | index when the index changes.
| |
| |
| | Don't just participate in USENET...get rewarded for it!
| |
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top