title: Formatting itextsharp table
body: <p>I have a given table with 2 columns which I try to export to pdf.</p>
  
  <p>This is my code:</p>
  
  <pre><code>PdfPTable tableUebersicht = new PdfPTable(dtUebersicht100.Columns.Count);
  tableUebersicht.SetWidths(new float[] { 250, 420 });
  tableUebersicht.LockedWidth = true;
  tableUebersicht.TotalWidth = 500f;
  
  foreach (DataColumn c in dtUebersicht100.Columns)
  {
      PdfPCell Spalte = new PdfPCell(new Phrase(c.ColumnName, VerdanaFont));
      Spalte.HorizontalAlignment = Element.ALIGN_CENTER;
      Spalte.VerticalAlignment = Element.ALIGN_MIDDLE;
      table.AddCell(Spalte);
  }
  foreach (DataRow dr in dtUebersicht100.Rows)
  {
      PdfPCell Spalte0 = new PdfPCell(new Phrase(dr[0].ToString(), VerdanaFont));
      Spalte0.HorizontalAlignment = Element.ALIGN_CENTER;
      Spalte0.VerticalAlignment = Element.ALIGN_MIDDLE;
  
      double Double1 = Convert.ToDouble(dr[1].ToString());
      PdfPCell Spalte1 = new PdfPCell(new Phrase(string.Format("{0:C2}", Double1), VerdanaFont));
      Spalte1.HorizontalAlignment = Element.ALIGN_RIGHT;
      Spalte1.VerticalAlignment = Element.ALIGN_MIDDLE;
  
      table.AddCell(Spalte0);
      table.AddCell(Spalte1);
  }
  
  table.WriteSelectedRows(0, -1, 35, 757, cb);
  </code></pre>
  
  <p>The output looks as followed:
  <a href="https://i.stack.imgur.com/KeIdC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KeIdC.png" alt="enter image description here"></a></p>
  
  <p>As you can see the table direction is from left to right and not from up to down. </p>
  
  <p>I would like to have a table like this where the direction is up to down, on the bottom of the page get up and continue left beside, every second row colored:</p>
  
  <p><a href="https://i.stack.imgur.com/aXwJo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aXwJo.png" alt="enter image description here"></a></p>