HI all,
I have a dropdown box and i have 100 items in that i need to shown the items in scrolll with specific height can anyone help me.
Thanks,
Manoj
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Jul 31, 2008, 1:19 AM EDT
Use the following code. Put your dropdown box code inside control and
Change the height by changing the height of table and div.
<table cellspacing="0" cellpadding="0" border="1"valign="top" align="center" height="100%" width="655">
<tr>
<td>
<div style="overflow-y: auto; height: 298px; width:215px;">
//your dropdown box code comes here.
div>
td>
tr>
table>
MANOJ MATHE35 reputationPosted Jul 31, 2008, 1:41 AM EDT
do u know the probelm happens ?
actualy you can give the height and width of the div if the height and width are static but for dropdown items are not shown everytime soo we cant do by this way .
Niradhip ChakrabortyRank #429 · 5.8K reputationPosted Jul 31, 2008, 3:34 AM EDT
oh!!!!! I have exlained it partly.It is very easy.
Simply add the following DIV tag around the SELECT box and you will get a scroller:
ex:
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td>
<div style="overflow-y: auto; height: 298px; width: 215px;">
<select id="cboMonth" style="width: 95px" tabindex="22" name="cboMonth" runat="server"
class="OLabel Cbo">
<option value="1">Januaryoption>
<option value="2">Februaryoption>
<option value="3">Marchoption>
<option value="4">Apriloption>
<option value="5">Mayoption>
<option value="6">Juneoption>
<option value="7">Julyoption>
<option value="8">Augustoption>
<option value="9">Septemberoption>
<option value="10">Octoberoption>
<option value="11">Novemberoption>
<option value="12">Decemberoption>
select>
div>
td>
tr>
table>