No vertical scrollbar in dropdownlist

Road Runner

Newcomer
Joined
Feb 13, 2002
Messages
5
Hi

I have a problem with the asp.net dropdownlist.

I fill the dropdownlist with say a 100 items and when I go to select an item from the list the dropdownlist takes up the whole height of the screen and only show the items that are visible on the screen. There are more items on the list but they appear off the screen and cannot be seen as the vertical scrollbar never appears.

I tried viewing this very same asp.net application from another computer and the scrollbar does appear for them. From this I came to the conclusion that it was a windows setting that was wrong, so I changed the theme of my computer to windows classic and now I can view the dropdownlist with the scrollbar. This is obviously not an ideal solution as I cannot tell my clients what theme they have to be running before my software will work.

Is this a bug with xp or asp.net?
Has anyone else come across this problem?

Any info would be greatly appreciated.

Thanks in advance
Shane.
 
It's not a bug with asp.net. It's a bug in the browser if it's a bug at all. The browser parses the html - if doesn't know that a <select> tag should scroll if it has more than 8 items - that's not .NET fault. You would have the same error if it was a static html page. Was this on a particular browser or on IE?
 
bri189a said:
It's not a bug with asp.net. It's a bug in the browser if it's a bug at all. The browser parses the html - if doesn't know that a <select> tag should scroll if it has more than 8 items - that's not .NET fault. You would have the same error if it was a static html page. Was this on a particular browser or on IE?


Hi bri189a

Thanks for the reply.

I don’t think it is a bug with the browser because when I switch the theme on my computer to windows classic it works fine but it does not work on the default windows xp theme.

I looked up some previous code that I had on the server with a dropdownlist in it to see if the problem was the same but I wasn’t, it worked fine.

I copied the code that worked into my new application and still the problem persists. :confused:

I had a closer look at the dropdownlist and it is being populated using AJAX JavaScript based on when another dropdownlist has changed. So i am now leaning towards the conclusion that the dropdownlist somehow doesnt like being populated through javascript.

I am still confused though, I don’t understand how the dropdownlist produces a scrollbar on one theme in xp and not in another.

BTW it seems to work fine in Win 2k

edit: sorry i forgot to mention that all the testing was done on IE 6

Shane
 
Unfortunately problems like that are a pain because they lie in source code (IE for XP) that you don't have access to. Not to mention while for the lazy developer it's nice, IE isn't W3C compliant (not that any browser is 100% compliant, but it's one of the worst) makes it all the more fun to debug problems on IE.

Now if you populate the select manually it sounds like you don't have an issue since you said it appears to be just when javascript does it. Can you write an 'alert' of what javascript is about to add to the select element to see if maybe it's throwing in a bad tag or not closing a tag or some weird thing like that? It may be something along those lines where XP IE 6 isn't as forgiving on tag closures as W2K IE6 is. Also have you downloaded the latest SP for IE6 - it may be a bug that has been fixed.
 
Back
Top