By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,619 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,619 IT Pros & Developers. It's quick & easy.

CheckBoxList item vertical distribution

P: n/a
When there are only a few items in the CheckBoxList they are distributed in
a sparse maner such as one at top, one in the middle and one at the bottom.
Is there any way to have the vertical spacing always consistent and at the
top? I looked for a setting but did not see one,.

Jun 27 '08 #1
Share this Question
Share on Google+
3 Replies

P: n/a

By default checkboxlist remain in vertical orientation ... and in
about 5px margin...
check you checkboxlist so that it dont have any height specified...
check also cellpadding and cellspacing... and change the repeat layout
from table to flow...

Best of luck

Jun 27 '08 #2

P: n/a
Hello Doug,

I reproduce the sparse layout of CheckBoxList when a big value of the
property "Height" is set in the control. For example:

<asp:CheckBoxList Height="500" runat="server" ID="chkList"
DataSourceID="SqlDataSource1" DataTextField="szDescription"
DataValueField="wCustType" />

Doug, would you please check whether there is a definition of Height on
your side? By removing the Height property, CheckBoxList will stay at the
top and use the default cell spacing (if not defined elsewhere) between the
checkboxes as is expected.

If this suggestion does not help, would you please show us some sample
code, e.g. your definition of the CheckBoxList in the aspx page, or
code-behind codes that operate on the control's properties?

Please let me know if you have any other concerns, or need anything else.

Jialiang Ge (ji****, remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:

Get notification to my posts through email? Please refer to

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 27 '08 #3

P: n/a
Great! That worked.
Jun 27 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.