I have tried the following code but its not working. please help me for finding the solution.
Source Code:
CheckBoxList chklstProducts = new CheckBoxList();
chklstProducts.DataSource = lstProduct;
chklstProducts.ID = "chklstProducts" + (i + 1);
chklstProducts.DataValueField = "ProductID";
chklstProducts.DataTextField = "ProductName";
chklstProducts.DataBind();
cell6.Height = 20;
Thanks in advance
You need to use CSS to achieve the vertical scroll with checkboxlist. You just need to wrap your list inside this div
<div style="width:200px; height:300px; overflow-y:auto">
// Checkbox List
</div>
By default scroll won't work. You may need to add your checkboxlist control inside a div
<div style="height:100px;overflow:auto;"> <asp:CheckBoxList></asp:CheckBoxList> </div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With