473,795 Members | 2,425 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:CheckBoxLi st ID="CheckBoxLis t1" runat="server" RepeatColumns=" 3"
RepeatDirection ="Vertical" RepeatLayout="t able">
<asp:ListItem>I tem 1</asp:ListItem>
<asp:ListItem>I tem 2</asp:ListItem>
<asp:ListItem>I tem 3</asp:ListItem>
<asp:ListItem>I tem 4</asp:ListItem>
<asp:ListItem>I tem 5</asp:ListItem>
<asp:ListItem>I tem 6</asp:ListItem>
<asp:ListItem>I tem 7</asp:ListItem>
</asp:CheckBoxLis t>

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 3201
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**********@g mail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
Gurus of asp.net and C# Please Help!

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

<asp:CheckBoxLi st ID="CheckBoxLis t1" runat="server" RepeatColumns=" 3"
RepeatDirection ="Vertical" RepeatLayout="t able">
<asp:ListItem>I tem 1</asp:ListItem>
<asp:ListItem>I tem 2</asp:ListItem>
<asp:ListItem>I tem 3</asp:ListItem>
<asp:ListItem>I tem 4</asp:ListItem>
<asp:ListItem>I tem 5</asp:ListItem>
<asp:ListItem>I tem 6</asp:ListItem>
<asp:ListItem>I tem 7</asp:ListItem>
</asp:CheckBoxLis t>

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**********@g mail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
Gurus of asp.net and C# Please Help!

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

<asp:CheckBoxLi st ID="CheckBoxLis t1" runat="server" RepeatColumns=" 3"
RepeatDirection ="Vertical" RepeatLayout="t able">
<asp:ListItem>I tem 1</asp:ListItem>
<asp:ListItem>I tem 2</asp:ListItem>
<asp:ListItem>I tem 3</asp:ListItem>
<asp:ListItem>I tem 4</asp:ListItem>
<asp:ListItem>I tem 5</asp:ListItem>
<asp:ListItem>I tem 6</asp:ListItem>
<asp:ListItem>I tem 7</asp:ListItem>
</asp:CheckBoxLis t>

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:CheckBoxLi st
ID="ChannelSkip HoursCheckBoxLi st"
RepeatLayout="F low"
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:CheckBoxLis t>

// 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**********@g mail.com> wrote in message
news:11******** **************@ y41g2000cwy.goo glegroups.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**********@g mail.com> wrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
> Gurus of asp.net and C# Please Help!
>
> I have a checkbox list solution to implement. This is my code
>
> <asp:CheckBoxLi st ID="CheckBoxLis t1" runat="server" RepeatColumns=" 3"
> RepeatDirection ="Vertical" RepeatLayout="t able">
> <asp:ListItem>I tem 1</asp:ListItem>
> <asp:ListItem>I tem 2</asp:ListItem>
> <asp:ListItem>I tem 3</asp:ListItem>
> <asp:ListItem>I tem 4</asp:ListItem>
> <asp:ListItem>I tem 5</asp:ListItem>
> <asp:ListItem>I tem 6</asp:ListItem>
> <asp:ListItem>I tem 7</asp:ListItem>
> </asp:CheckBoxLis t>
>
> 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:CheckBoxLi st
ID="ChannelSkip HoursCheckBoxLi st"
RepeatLayout="F low"
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:CheckBoxLis t>

// 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**********@g mail.comwrote in message
news:11******** **************@ y41g2000cwy.goo glegroups.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**********@g mail.comwrote in message
news:11******** **************@ i40g2000cwc.goo glegroups.com.. .
Gurus of asp.net and C# Please Help!

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

<asp:CheckBoxLi st ID="CheckBoxLis t1" runat="server" RepeatColumns=" 3"
RepeatDirection ="Vertical" RepeatLayout="t able">
<asp:ListItem>I tem 1</asp:ListItem>
<asp:ListItem>I tem 2</asp:ListItem>
<asp:ListItem>I tem 3</asp:ListItem>
<asp:ListItem>I tem 4</asp:ListItem>
<asp:ListItem>I tem 5</asp:ListItem>
<asp:ListItem>I tem 6</asp:ListItem>
<asp:ListItem>I tem 7</asp:ListItem>
</asp:CheckBoxLis t>

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
2235
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 checkbox list. The problem is I'm unable to raise an event when I select any of the checkboxes. Following is the code: Could you guys please help me on this issue.
1
663
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 column (which contains checkbox), when i click the CheckBox in the Header of DataGrid, all the rows (for column which contains Checkboxes) must be checked. When i uncheck the checkbox in Header of DataGrid, all the rows of that column must be unchecked,...
0
271
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 want the checkbox to come up and I am using the split method to seperate the items back into an array. How to I loop through this array to have the item values that were originally chosen to show as checked on the checkbox list so the users will...
8
16618
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 the repeater. When clicked, it is supposed to
6
1605
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" 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>
5
1723
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 that particular record moved to a new table. Is this possible? If it is possible, can someone please tell me what I need to do to get this to work? Thank you.
4
2838
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" name="FormListName" value="31" />Adobe client-server form</td> </tr> <tr> <td><input type="checkbox" name="FormListName" value="32" />Adobe XDP form</td> </tr> <tr>
0
4102
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 with my problems. Now for my new little problem,I had a problem posting the values from checkbox fields to a database and thats the obstacle I overcame. Now the second part is my new problem is that I want that the next time that page loads for...
1
1861
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. --------------------- I have a form with checkboxes and corresponding textfields for each checkbox. Here is the HTML
9
4024
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 the word "bluetooth" and "MP3" <input type="checkbox" value="bt" />Bluetooth <br /> <input type="checkbox" value="cs" />Card slot <br /> <input type="checkbox" value="mp3" />MP3 player <br />
0
9672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10437
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10164
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10001
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9042
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6780
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.