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 6824755
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:56:23+00:00 2026-05-26T21:56:23+00:00

I have a table, this table has 3 columns. In each column, there is

  • 0

I have a table, this table has 3 columns. In each column, there is a table like the picture.
I did a method to generate table, this method receive a list in argument and loop on it to
addCell to the table

I’d like for a line has a instead of 5 columns … 1 + 1 (colspan of 4). When I do a colspan
the 4 first are merged, I’d like merged the 4 last and keep the first.

How can I do this ?

Thanks,

enter image description here
enter image description here

  • 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-26T21:56:24+00:00Added an answer on May 26, 2026 at 9:56 pm

    You just need to add the cells to the table in the order that you want them to span. If you add the spanned cells before the first cell then that’s how they’ll appear.

    PdfPTable t = new PdfPTable(5);
    //Row 1
    t.AddCell("R1C1");
    t.AddCell("R1C2");
    t.AddCell("R1C3");
    t.AddCell("R1C4");
    t.AddCell("R1C5");
    
    //Row 2 - One regular cell followed by four spanned cells
    t.AddCell("R2C1");
    t.AddCell(new PdfPCell(new Phrase("R2C2-5")) { Colspan = 4 });
    
    //Row 3 - Four spanned cells followed by one regular cell
    t.AddCell(new PdfPCell(new Phrase("R3C1-4")) { Colspan = 4 });
    t.AddCell("R3C5");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mySQL table that has a column like this: ID ----- 0352
I have a HTML table where each row has two columns. First column is
I have a table TreeStructures wich holds structures of Trees. This table has columns
Let's say I have a table Foo . This table has the columns ID
I have a method private static DataTable ParseTable(HtmlNode table) and sometimes this method has
I have a table where each rows has a check box. This code works
I have a table that has a column that contains links. Each cell in
I have a legacy mysql database and there's this table which has a few
i have a table called as X and this table has a field known
Lets say I have one table called REVIEWS This table has Reviews that customers

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.