Dividing one column to 4 columns in the Repeater control

Hi Folks,

The following is my Repeater-Control code that providing a list of 20 companies names. I'm getting all of the data in one long column and I would like to divide this one column to 4 columns.

Is it possible? how can I do it in my code:

                                    <asp:Repeater ID="catlist" runat="server">
                                            <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                                <td style="font-family: Arial; font-size: 5px">
                                                    <a href="<%# "article.aspx?id=" + DataBinder.Eval(Container.DataItem,"SupplierID") %>"
                                                        style="font-family: Arial; font-size: 10px">
                                                        <%# DataBinder.Eval(Container.DataItem,"CompanyName") %>
 Thanks in advance,
Yair Nevet
Microsoft MCAD.NET
4/21/2007 5:19:19 AM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

5 Replies

Similar Articles

[PageSpeed] 11

Do you mean the long text to be displayed in 4 columns? Or you want to divide the string into 4 parts?


Mark post(s) as "Answer" that helped you

Electronic Screw
4/21/2007 7:31:46 AM


Now I get a list of companies names in one column, and I need to divide it to 4 columns, instead of one column.

Yair Nevet
Microsoft MCAD.NET
4/21/2007 10:22:37 AM
1    <ItemTemplate>
2    	<tr>
3    		<td style="font-family: Arial; font-size: 5px">
4    			<a href="<%# "article.aspx?id=" + DataBinder.Eval(Container.DataItem,"SupplierID") %>"
5    				style="font-family: Arial; font-size: 10px">
6    				<%# DataBinder.Eval(Container.DataItem,"CompanyName") %>
7    			</a>
8    		</td>
9    		<td>Another Column1</td>
10   		<td>Another Column2</td>
11   		<td>Another Column3</td>				
12   	</tr>
13   </ItemTemplate>

You can add as many columns by adding a new <td></td> block. Also you have closed the tags in reverse order in the code you posted. Check it.


Mark post(s) as "Answer" that helped you

Electronic Screw
4/21/2007 12:31:39 PM

Hi Dude,

First, thank you very much for your responses.

Second, unfortunately, your solution is not want I need.

let me visually describe my wish -

I have a list of companies names, which is a column of 20 rows:

And so on....

 And I need to divide the layout of this one column to 4 columns, just like the following:
Company1 Company6
Company2 Company7
Company3 Company8
Company4 Company9
Company5 Company10   And so on....


Yair Nevet
Microsoft MCAD.NET
4/21/2007 1:52:39 PM

In such case, I would prefer DataList over Repeater control. Set the RepeatDirection = Horizontal and RepeatColumns = 4


Mark post(s) as "Answer" that helped you

Electronic Screw
4/21/2007 8:45:39 PM

Similar Artilces:

How we can change control from one column to specific column in datawindow
How we can change control from one column to specific column in datawindow programatically. Let's suppoose there are three column in datawindow 1: Name 2: address 3: Phone when we open the window, Tab or Cursor is on column 1 (Name) now i have one button ...i want to write code in that button...when i click that button control or tab or cursor goto the phone column. Please somebody tell me how i can do this... thanks noaman mughal SetColumn. -- Bruce Armstrong [TeamSybase] http://www.teamsybase.com Two new books on developing with PowerBuilder http://www.pb9...

How to manipulate images and combe multiple database columns into one column in a GridView control
Hi Folks,I'm hoping someone can help me out with something.I am trying to put together a photo album as a learning exercise and have a GridView control with two columns linked to an Access Data Source. In the left hand column (called Image) I want to display the photo and in the right hand column (called Details) I want to provide details such as Date, Location, People and Comments, Camera Type etc. Each of these is columns is taken from the database I have set up.However, I have am having some problems:1: At the moment I have been able to get the image to display (using an image column ...

How do I control one control from another control?
I have a page page1.aspx which is within a master page. On page I have a table with two cells. Within each cell I have placed two controls (ascx) that I have developed. Now I'd like to be able to get these two controls to interact. One needs to update the other. One has some search criteria that the other one needs to update its gridview. One needs to make the other visible/not visible at certain times. Out of the box neither control can see each other at all. Is there a good article or someplace I can find some information on how to do this?  AllAboutFocus.com. Information Technolo...

How can I control the width of a column in the GridView control.
From searching I see mention of ways to do it before the controls are bound. Is there a simpler way? If not, could someone explain to me how I need to go about it?Here is the code: <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id"        DataSourceID="SqlDataSource1" EmptyDataText="There are no data records to display."        OnSelectedIndexChanged="GridView1_SelectedIndexChanged">   &nbs...

want to call one c#.net function in one user control from another user control
hi i have two user controls info.ascx and personal.ascx i have a function like in info.ascx i have a function like showdetails() {   } now i want to access this function from personal.ascx can i do this ? thanks in advance. shwetaThanksshwetaIn a day when don't come across any problem -you can be sure that you are traveling in wrong path  you should better create a class where you will define the "functions" that you need in both files. declare "static" the function and call it like nameofclass.nameoffunction In a web project you can...

Repeater control in another repeater control
Hi, I want Repeater control in another repeater control but it is not working Code : <asp:Repeater ID=CourseMaster Runat=server > <ItemTemplate> <table border=0 cellpadding=0 cellspacing=0 style="font-family:tahoma;font-size:12"> <tr> <td >&nbsp;<b</b></td> </tr> <tr> <td> <asp:repeater ID="CourseDetails" Runat=server> <ItemTemplate> <tab...

Hidden column in Repeater Control
Hello All! I have a Repeater Control which is going to display records from a particular table. I have buttons to Update and Delete these rows. I need to hide the record ID in each row so that I will know which record in my table to update. I don't want to show this record ID to the user since it's just an autonumber ID and won't mean anything to the user. I am using a table to display the data in the repeater. How can I hide the record ID in each row? I am using a table to display the data --- can I hide a column of the table? Is there another way to do this? Thanks for your h...

two column repeater control?
I want to display my data in a two column repeater control.  Art some point it may go to three columns.  My control looks like this:          <asp:Repeater ID="Repeater1" runat="server">            <HeaderTemplate>              <table class="p_innerTable">            </HeaderTemplate>     ...

Sum of Columns in Repeater Control
Hello Everyone, I am currently working on a project in .NET framework 1.1 and using the Visual Studios 2003 IDK. In my project I have a repeater control with 10 columns. Out of those 10, I need 8 to be sub-totaled in the bottom of each. What is the easiest way to calculate the sum of the values that are shown in each column dynamically? Thank you and I will highly appreciate your help in this matter. Also, I am a new developer so please be very simplistic in your reply. I'm still in the learning process. Thanks again.  Regards,Omair    Hi omaleem , In thi...

hide column in repeater control
how could i hide the perticular column in repeater control i make one of the <td> (which i want to hide) run at server an give some id to it say party please help me out ! waiting for reply ...

Hiding a column in a Repeater Control
Hello All, I am using a <asp:Repeater> control that contains a table with multiple columns.  I need to be able to hide/show a column based on the user selection. I tried the following code, and it doesn't work. Any suggestions? Here is a snippet of the code I used : <HeaderTemplate>           }<table id="tblHeader" runat="server"> <tr runat="server">  <td id="tdColumnToHideHeader" class="mediumfont" width="6%" align="ri...

Pasting a string from RTE control to a column in a DW control
Hello, How do one paste a string copied from a RichTextEdit Control into a column in a DataWindow Control (this DW is of RichText format too ..)? What i would like it to do is equivalent to: dw_1.SetItem(1,'title',ls_richtext) I tried out the script below, but the string is pasted not in any column.. but rather just before the text header 'Title' : string ls_richtext ls_richtext = rte_1.CopyRTF(FALSE) rte_2.PasteRTF(ls_richtext) dw_1.PasteRTF(ls_richtext) IF dw_1.Update() = 1 THEN COMMIT; messagebox('code',sqlca.sqlcode) END IF Thank...

Ajax Control : Calender Control is not showing Saturday Column
Calender Control is not showing Saturday Column  Rajeev Kumar TiwariMicrosoft Professional Hi Rajeev, If a column is not showing in the calender extender then, it is lapsing with the css file that u placed on the control. U can have a better solution for this. U just place a .css file for the Calender control given by Microsoft called Calender.css in u r css file. Then, u may feel free to use. U can find that file in AjaxControlToolKit/Calendar/Calendar.css Mark as answer if this helped u. Regards, ChanduImagination is more important than knowledge..[Albert Einstein]Regards,C...

Only one table column in n-columns presentation style
Hi all, I think it�s better to explain our problem with an example. Any idea to do this data (2 records): ID: 1 DATE: 19/01/2000 OBS: 11111111111 22222222222 333333 aaaaaaaa line444ae q qwe qweqee ID: 2 DATE: 19/01/2000 OBS: ad asdasda as fffffffffff hhhhhhh mmmmmmmmmPPPPPPPPPP ooooo on one DataObject (something) like: ************ ID: 1 DATE: 19/01/2000 OBS: 111111111111 aaaaaaaa 444ae 22222222222 q qwe qweqee 333333 ************ ID: 2 DATE: 19/01/2000 OBS: ad asdasda as PPPPPPPPPP ...

Web resources about - Dividing one column to 4 columns in the Repeater control - asp.net.presentation-controls

Dividing territories - Wikipedia, the free encyclopedia
Dividing territories (also market division ) is an agreement by two companies to stay out of each other's way and reduce competition in the agreed-upon ...

Dividing Jerusalem Puts Holy Sites in Danger - YouTube
Dr. Dore Gold, president of the Jerusalem Center for Public Affairs warns of the vulnerability of holy sites if part of Jerusalem is turned over ...

'A bit of a joke': Helpmann Awards still dividing the critics
Sir Robert Helpmann would surely turn in his grave if he could hear the words used to describe the performing arts awards that are named in his ...

HIV prevention drug PrEP: Little blue pill dividing Australia’s gay community
IT’S BEEN called the “game changer” that could eliminate HIV in Australia within five years.

Australian Liberty Alliance Hopes To Unite Australians By Dividing Australians
A new political party that was officially launched in Perth yesterday has pledged to do its best to unite Australians by dividing Australians. ...

David Kilcunnen on ISIS as the new totalitarian state dividing the world
David Kilcullen cites Nietzsche on the abyss that looks back and on fighting monsters and becoming one.

Buckley denies power play by stars is dividing Magpies
Collingwood coach Nathan Buckley has praised his senior players and denied the so-called Brat Pack is involved in a power play, declaring his ...

Class, not generation, is the real dividing line
A new report has found that young people are financially worse off than ever, but we mustn't forget older Australians when thinking about generational ...

Dividing Line - Segregation in Israel's public bus lines - YouTube
Production, photography & editing by http://EranVered.com for http://KavLaoved.org.il Hebrew subtitles version: https://www.youtube.com/watch?v=veG_-LUjonw ...

Women activists denied bid to walk across DMZ dividing Koreas
International women activists have been denied an attempt to walk across the Demilitarized Zone dividing North and South Korea, but allowed to ...

Resources last updated: 12/14/2015 2:07:54 PM