Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 778583
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T19:47:14+00:00 2026-05-14T19:47:14+00:00

Good afternoon. I have a Repeater with a ItemTemplate that prints one column with

  • 0

Good afternoon.

I have a Repeater with a ItemTemplate that prints one column with data.

<asp:Repeater id="OtherProductsRepeater" runat="server">

    <ItemTemplate>
(...data...)
        </ItemTemplate>

</asp:Repeater>

How can i modify the code to instead of one column create three columns to show the data?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T19:47:15+00:00Added an answer on May 14, 2026 at 7:47 pm

    Edited to show using repeater to make a three column layout

    <table>
    <asp:Repeater id="OtherProductsRepeater" OnItemCreated="OtherProductsRepeater_ItemCreated" runat="server"> 
      <ItemTemplate> 
    
        <asp:PlaceHolder id="row_end" visible="<%# _showRowEnd %>" runat="server">
        </tr>
        </asp:PlaceHolder>
    
        <asp:PlaceHolder id="row_start" visible="<%# _showRowStart %>" runat="server">
        <tr>
        </asp:PlaceHolder>
    
          <td>(data)</td>
          <td>(data)</td>
          <td>(data)</td>
    
      </ItemTemplate> 
    </asp:Repeater> 
    
      </tr> <%-- close final row --%>
    </table>
    

    in your code, you need these page level members:

    private int _rowCounter = 0;
    protected bool _showRowEnd;
    protected bool _showRowStart;
    

    and the event handler:

    protected void OtherProductsRepeater_ItemCreated(Object Sender, RepeaterItemEventArgs e) {
      if (_rowCounter == 0) {  // first row
        _showRowStart = true;
        _showRowEnd = false;
        _rowCounter = 1;
      }
      else if (_rowCounter == 3) {
        _showRowStart = true;
        _showRowEnd = true;
        _rowCounter = 1;
      }
      else {
        _showRowStart = false;
        _showRowEnd = false;
        _rowCounter += 1;
      }
    }
    

    Another thought – if you are talking about newspaper-style columns, where the content flows from the bottom of one column to the top of the next, use a DataList control instead of a repeater.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good afternoon, I have a gridview (resume of the gridview) <asp:GridView ID=GridView1 runat=server AutoGenerateColumns=False
Good afternoon, I have been working on a dll that can use CORBA to
Good afternoon! I have recently come across an issue that I am hoping can
Very good afternoon to all, The problem I have now is that I can
Good Afternoon, I have a page (category-list.apsx) that uses the Repeater Control method to
Good afternoon all. I have a page that displays data in a gridview based
Good Afternoon all , I have downloaded data from a web service and im
Good Afternoon All, I have two tables in my SQL Server 2005 DB, Main
Good afternoon all, I have a Java applet that I wish to embed on
Good Afternoon, I have a html aspx page that has many many div elements.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.