ASP.Net 2.0 CheckBox List Layout Issue?

C

Chaprasi

Gurus of asp.net and C# Please Help!

I have a checkbox list solution to implement. This is my code

<asp:CheckBoxList ID="CheckBoxList1" runat="server" RepeatColumns="3"
RepeatDirection="Vertical" RepeatLayout="table">
<asp:ListItem>Item 1</asp:ListItem>
<asp:ListItem>Item 2</asp:ListItem>
<asp:ListItem>Item 3</asp:ListItem>
<asp:ListItem>Item 4</asp:ListItem>
<asp:ListItem>Item 5</asp:ListItem>
<asp:ListItem>Item 6</asp:ListItem>
<asp:ListItem>Item 7</asp:ListItem>
</asp:CheckBoxList>

When it renders, the output is

1st Column 2nd Column 3rd Column
--------------------------------------------------------------------
Item 1 Item 4 Item 6
Item 2 Item 5 Item 7
Item 3

How can I achieve the following output?

1st Column 2nd Column 3rd Column
--------------------------------------------------------------------
Item 1 Item 4 Item 7
Item 2 Item 5
Item 3 Item 6

Did anyone have this issue with the CheckBoxList? Help is appreciated.

Thanks
Chaprasi Bhai
 
C

Chaprasi

Thanks for the reply Clinton,

Do you have a sample code you could share with the group?

Thanks,
Chaprasi
 
C

clintonG

Throw this into a page and see what you can make of it...

<asp:CheckBoxList
ID="ChannelSkipHoursCheckBoxList"
RepeatLayout="Flow"
RepeatColumns="6"
RepeatDirection="Horizontal"
ToolTip="Skip hours the webfeed is not available."
runat="server" >

<asp:ListItem Value="0" Text="<span class='RssSkip'>12:00 am&nbsp;</span>"
/>
<asp:ListItem Value="1" Text="<span class='RssSkip'>01:00 am&nbsp;</span>"
/>
<asp:ListItem Value="2" Text="<span class='RssSkip'>02:00 am&nbsp;</span>"
/>
<asp:ListItem Value="3" Text="<span class='RssSkip'>03:00 am&nbsp;</span>"
/>
<asp:ListItem Value="4" Text="<span class='RssSkip'>04:00 am&nbsp;</span>"
/>
<asp:ListItem Value="5" Text="<span class='RssSkip'>05:00 am&nbsp;</span>"
/>
<asp:ListItem Value="6" Text="<span class='RssSkip'>06:00 am&nbsp;</span>"
/>
<asp:ListItem Value="7" Text="<span class='RssSkip'>07:00 am&nbsp;</span>"
/>
<asp:ListItem Value="8" Text="<span class='RssSkip'>08:00 am&nbsp;</span>"
/>
<asp:ListItem Value="9" Text="<span class='RssSkip'>09:00 am&nbsp;</span>"
/>
<asp:ListItem Value="10" Text="<span class='RssSkip'>10:00 am&nbsp;</span>"
/>
<asp:ListItem Value="11" Text="<span class='RssSkip'>11:00 am&nbsp;</span>"
/>
<asp:ListItem Value="12" Text="<span class='RssSkip'>12:00 pm&nbsp;</span>"
/>
<asp:ListItem Value="13" Text="<span class='RssSkip'>01:00 pm&nbsp;</span>"
/>
<asp:ListItem Value="14" Text="<span class='RssSkip'>02:00 pm&nbsp;</span>"
/>
<asp:ListItem Value="15" Text="<span class='RssSkip'>03:00 pm&nbsp;</span>"
/>
<asp:ListItem Value="16" Text="<span class='RssSkip'>04:00 pm&nbsp;</span>"
/>
<asp:ListItem Value="17" Text="<span class='RssSkip'>05:00 pm&nbsp;</span>"
/>
<asp:ListItem Value="18" Text="<span class='RssSkip'>06:00 pm&nbsp;</span>"
/>
<asp:ListItem Value="19" Text="<span class='RssSkip'>07:00 pm&nbsp;</span>"
/>
<asp:ListItem Value="20" Text="<span class='RssSkip'>08:00 pm&nbsp;</span>"
/>
<asp:ListItem Value="21" Text="<span class='RssSkip'>09:00 pm&nbsp;</span>"
/>
<asp:ListItem Value="22" Text="<span class='RssSkip'>10:00 pm&nbsp;</span>"
/>
<asp:ListItem Value="23" Text="<span class='RssSkip'>11:00 pm&nbsp;</span>"
/>
</asp:CheckBoxList>

// The CSS class you'll need
..RssSkip
{
padding: 0 .5em 0 0;
color: #585880;
font-name: Verdana;
font-size: 1em;
border-style: none;
}


<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top