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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Niradhip ChakrabortyPosted Jul 31, 2008, 7:34 AM
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>
MANOJ MATHEPosted Jul 31, 2008, 5:41 AM
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 ChakrabortyPosted Jul 31, 2008, 5:19 AM
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>