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

  • SEARCH
  • Home
  • 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 6344715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:41:42+00:00 2026-05-24T20:41:42+00:00

I am working on devexreport and I want to create a table programmatically I

  • 0

I am working on devexreport and I want to create a table programmatically I use these codes but have a little problem.

        DevExpress.XtraReports.UI.XRTable tbl = new XRTable();    
        DevExpress.XtraReports.UI.XRBarCode xrBarCode = new XRBarCode();

        Detail1.Controls.Add(tbl);

        tbl.Location = new System.Drawing.Point(358, 17);
        tbl.Size = new System.Drawing.Size(358, 50);
        tbl.Borders = (DevExpress.XtraPrinting.BorderSide)
            (((DevExpress.XtraPrinting.BorderSide.Left  
             | DevExpress.XtraPrinting.BorderSide.Top)
             | DevExpress.XtraPrinting.BorderSide.Right)
             | DevExpress.XtraPrinting.BorderSide.Bottom);


        // Total number of rows.
        int rowCnt;
        // Current row count.
        int rowCtr;
        // Total number of cells per row (columns).
        int cellCtr;
        // Current cell counter
        int cellCnt;

        rowCnt = int.Parse("2");
        cellCnt = int.Parse("3");

        for (rowCtr = 1; rowCtr <= rowCnt; rowCtr++)
        {
            // Create new row and add it to the table.
            DevExpress.XtraReports.UI.XRTableRow row = new XRTableRow();
            tbl.Rows.Add(row);
            for (cellCtr = 1; cellCtr <= cellCnt; cellCtr++)
            {
                // Create a new cell and add it to the row.
                DevExpress.XtraReports.UI.XRTableCell cell = new XRTableCell();
                cell.Text = "Row " + rowCtr + ", Cell " + cellCtr;
                row.Cells.Add(cell);
            }
        }

I try this code bur the last row is confused! all of the cels are on first cell.

The table result is like this

What is wrong?

  • 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-24T20:41:43+00:00Added an answer on May 24, 2026 at 8:41 pm

    Not sure if it will help, but try moving tbl.Rows.Add(row); part like this:

    for (rowCtr = 1; rowCtr <= rowCnt; rowCtr++)
    {
        // Create new row..
        DevExpress.XtraReports.UI.XRTableRow row = new XRTableRow();
    
        for (cellCtr = 1; cellCtr <= cellCnt; cellCtr++)
        {
            // Create a new cell and add it to the row.
            DevExpress.XtraReports.UI.XRTableCell cell = new XRTableCell();
            cell.Text = "Row " + rowCtr + ", Cell " + cellCtr;
            row.Cells.Add(cell);
        }
    
        // ..and add it to the table.
        tbl.Rows.Add(row);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on a console application using Delphi 7, and have run into a problem.
Working with C and Win32, I have a problem where my program freezes instead
Working on a project at the moment and we have to implement soft deletion
Working with Visual Studio (I'm using 2008) I have started to notice that when
working with iis7. project is in Integrated Pipelinemodus Application Pool is : DefaultAppPool have
Working with an API that can handle multiple connections (i.e. sessions), each of these
Working live URL showing problem: http://69.24.73.172/demos/newDemo/test.html The HTML : <div class="small-vote"> <a href="#" class="s
working on an old translation sample code for windows phone 7. Recently, I have
Working on a end of the year project for school and chose to create
Working with some basic java apps on CentOS 5 linux and I have my

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.