Last post Jul 23, 2008 06:04 AM by Dr.Osika
Jul 21, 2008 02:53 PM|Jagadeesh Jupalli|LINK
I want to limit the number of items displayed in my dropdownlist. I have a dropdownlist with around 50 values and want to display five items in the dropdownlist.
or How can I set the Maximum Height?
Plz let me know your thoughts.
ASP.Net 2.0 C#
Jul 21, 2008 03:15 PM|Suprotim Agarwal|LINK
Had it been for a listbox, then there were some options. However for a DDL, I do not think you can do anything with the Height.
Jul 21, 2008 03:29 PM|Ganesh@Nilgris|LINK
i suggest to use listbox instead of a dropdownlist and u dont any option to specify the height
Jul 23, 2008 05:55 AM|Hua-Jun Li - MSFT|LINK
As far as I know, the server control dropdownlist seem to not exist the property Height.
But you can hidden the .redundant items like the following.
protected void Page_PreRender(object sender, EventArgs e)
int i = 0;
foreach (ListItem li in RadioButtonList1.Items)
Jul 23, 2008 06:04 AM|Dr.Osika|LINK