By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,218 Members | 1,239 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,218 IT Pros & Developers. It's quick & easy.

dropdownlist returning wrong index

P: n/a

I have a dropdownlist with x amount of list items, however quite often a lot
of the list items have the same value.

The dropdownlist is bound to an ArrayList of objects and I'm using the
selectedindex (-1) to access the corresponding object of the item selected
from the list.

However, for instance, if there is 5 items with the same value, and I select
the 5th of those items which maybe index 10, the selectedindex propert
returns the index of the first item with that value, i.e. index 6.

At the moment I'm using a hidden control and some javascript to get round
it, but I was wondering if anyone knows:

a) why it is doing this?
b) how can it be resolved?
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.