473,387 Members | 1,453 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ASP.Net 2.0 CheckBox List Layout Issue?

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

Jun 30 '06 #1
6 3182
Set the RepeatLayout property to "flow" and use CSS to do what you want.
I've had to set properties on each individual span that is output but that's
what is neccessary.

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

"Chaprasi" <ch**********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
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

Jun 30 '06 #2
Thanks for the reply Clinton,

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

Thanks,
Chaprasi

clintonG wrote:
Set the RepeatLayout property to "flow" and use CSS to do what you want.
I've had to set properties on each individual span that is output but that's
what is neccessary.

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

"Chaprasi" <ch**********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
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


Jun 30 '06 #3
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/

"Chaprasi" <ch**********@gmail.com> wrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...
Thanks for the reply Clinton,

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

Thanks,
Chaprasi

clintonG wrote:
Set the RepeatLayout property to "flow" and use CSS to do what you want.
I've had to set properties on each individual span that is output but
that's
what is neccessary.

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

"Chaprasi" <ch**********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
> 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
>

Jul 1 '06 #4
Thanks for the code clinton, but unfortuante it does not give me what I
need.

clintonG wrote:
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/

"Chaprasi" <ch**********@gmail.comwrote in message
news:11**********************@y41g2000cwy.googlegr oups.com...
Thanks for the reply Clinton,

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

Thanks,
Chaprasi

clintonG wrote:
Set the RepeatLayout property to "flow" and use CSS to do what you want.
I've had to set properties on each individual span that is output but
that's
what is neccessary.

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

"Chaprasi" <ch**********@gmail.comwrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
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
Jul 5 '06 #5
Anybody has a simple solution for this problem?

Help is appreciated.
Thanks

Jul 5 '06 #6
Hi!

"Chaprasi" wrote:
Anybody has a simple solution for this problem?

Help is appreciated.
Thanks

Jul 26 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Steven | last post by:
Hi, I'm creating a custom checkbox list control which will take 2 arraylists as input. (One will contain Names and other will contain 0s and 1s. 0 - uncheck 1- check). I'm able to create the...
1
by: Machi | last post by:
Let say i select rows of records with 4 columns from Database and want to display the data in DataGrid (ASP.NEt Server Control) with one column which must be displayed in CheckBox layout. For the...
0
by: Bilbo | last post by:
I have a checkbox control on a ASP.NET web form with 8 items. I have the form saving the users selected items into a database field seperated by a ",". When the users want to edit their request, I...
8
by: Alan Silver | last post by:
Hello, I have a repeater that has code like this... <ItemTemplate> <asp:CheckBox ID="chkDelete" Text="" RunAt="server"/> .... other stuff goes here </ItemTemplate> There is a button below...
6
by: Chaprasi | last post by:
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"...
5
by: sanchs | last post by:
I have created an inventory database in Microsoft Access 2003. In my assets form, I have a checkbox for cannibalized computers. I would like to be able to put a check in that checkbox and have...
4
by: narsibvl | last post by:
Here is a piece of html code <form name="package_information" id="package_information" method="post" enctype="multipart/form-data""& lt;" <tr> <td><input type="checkbox"...
0
by: cyberdawg999 | last post by:
Greetings all in ASP land I have overcome one obstacle that took me 2 weeks to overcome and I did it!!!!! I am so elated!! thank you to all who invested their time and energy towards helping me...
1
by: newbie | last post by:
Hello All, I'm trying to figure out this array problem I have. I don't know if I'm doing this correctly. Anyone want to take a look. --------------------- Current Situation....
9
greensleeves
by: greensleeves | last post by:
Hi, Im a newbie to PHP and I'm wondering if someone could help me out with this Tryng to search out products from a database by clicking a checkbox option for instance if description contains...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.