drop down list: size

I

Ian Oldbury

Hi all,

i'm trying to define the number of items that are shown at a time on a
dropdownlist. Ideally i'd like to do this within the css class if possible.
How is this done??

This the control....
<asp:dropdownlist id="ddlRange"
runat="server"
autopostback="true"
cssclass="DropDownBox"
enableviewstate="True" >
</asp:dropdownlist>
 
G

Guest

you populate the drop down list with the data that you want. What ever you
put in, you get out. To limit your list, don't insert the data. The drop
down list is not like a datagrid where you can do paging.
 
I

Ian Oldbury

ah that confuses me a little, as my understanding was that the dropdownlist
is the asp.net version of HTML form control. Which when setting the size
property would limit the number that could be seen at a time without using
the scrollbars.
 
W

William F. Robertson, Jr.

Are you wanting to know how large to make the DropDownList? All the items
would be there, but you want to control how many are "visible" at a time?

bill
 
Joined
Oct 26, 2006
Messages
1
Reaction score
0
We have an application with dropdownlists that are filled from the database. These lists can vary in size from a couple of values to hundreds. We noticed some strange behavior at our customer site when they were running the web application. When they click the dropdown, the list expanded to almost the height of the screen (displaying 30 values). When we do the same thing from our development machine, the list expands to display about 10 values. Both lists have scroll bars so we can scroll to all the values (in this case a total of 50).

We discovered that the difference is that our dev machine is using the Windows Classic theme and the users machine uses the Windows XP theme (both running Windows XP SP 2). Because of a variety of issues, they cannot use the Windows Classic theme, therefore, we need a way to limit the size of the dropdown after the user has clicked the dropdown button. We have looked into using the SIZE attribute and also the LENGTH attribute but neither works well.

Can anyone suggest what property in the Windows Classic theme that is different from the Windows XP theme that might cause this to happen? Or can someone suggest some other solution?

BTW we are developing in VS 2003 ASP 1.1.

Thanks
Richard Anderson
 
Joined
Nov 25, 2008
Messages
1
Reaction score
0
Richard,

It's been a couple years, but did you ever figure this out? We just came accross the same issue.

Thanks,

Jay
 
Joined
May 5, 2009
Messages
1
Reaction score
0
same Problem

Hi Richard,
Did u get the answer for the said problem? i just got the same problem..can u help me by saying how u figured it out.


Siri
 
Joined
Feb 27, 2009
Messages
2
Reaction score
0
I needed a means to provide more information than a drop down list allows - basically multi-lines. My solution uses a asp:repeater, DHTML and CSS. Given that it's a div, you'll have complete control over the size and scrolling. Interested?
 

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

No members online now.

Forum statistics

Threads
474,143
Messages
2,570,821
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top