开发者

I want to display only one item at a time in checkboxlist n provide scroll bar when we click on checkboxlist for multiselection

开发者 https://www.devze.com 2023-03-16 20:55 出处:网络
i want a checklistbox as a dropdow开发者_JAVA百科nlist with checkbox inside. means it must provide scroll bars in checkboxlist n show 1 item at first.Wrap your CheckBoxList in a <div>.

i want a checklistbox as a dropdow开发者_JAVA百科nlist with checkbox inside. means it must provide scroll bars in checkboxlist n show 1 item at first.


Wrap your CheckBoxList in a <div>.

CSS:

#wrapper{ border:solid 1px #aaa; height:20px; width:300px; overflow:auto;}

HTML:

<div id="wrapper">
   <asp:CheckBoxList ID="chkBoxes" runat="server" ></asp:CheckBoxList>
</div>

Then use javascript to change the styling (CSS) of the <div> on the onclick event.

Here's an implementation example: http://www.codeproject.com/KB/webforms/MultiSelect.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消