Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CheckBoxList with scroll bars 1

Status
Not open for further replies.

JCruz063

Programmer
Feb 21, 2003
716
US
Hi All,
Is it possible to have a CheckBoxList control with scroll bars? My application needs to allow the user to select multiple items from a list and my boss wants each item to have a check box next to it. Currently I'm using the CheckBoxList control. The problem I have is that there are too many items and the CheckBoxList doesn't seen to use scroll bars. I know I can have it display multiple columns but my boss doesn not want that. Can anybody tell me how I could create a CheckBoxList control that has scroll bars?

Thanks

JC

We don't see things as they are; we see them as we are. - Anais Nin
 
You can stick it in a scrolling div:

Code:
<div style="height:50px;width:350px;overflow:auto">
  <asp:CheckBoxList ....  />
</div>

This trick works nicely for any type of control or anything else. The only problem is printing... it doesn't.

;-)
paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Paul, thanks a lot... It works beatifully, but there is one little problem. I have more than one CheckBoxList on the same page and they need to be displayed horizontally, one next to the other. The problem is that I can't make them appear one next to the other. No matter what I do, the DIVs are displayed one on top of the other. Besides using GridLayout mode, is there any way I could make the DIVs be displayed next to each other?

Thanks!

JC

We don't see things as they are; we see them as we are. - Anais Nin
 
Place them into a table.

;-)
-paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Yup, I got that... Thanks!

JC

We don't see things as they are; we see them as we are. - Anais Nin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top