title: Changing Column Alignment to "RIGHT" in iTextSharp from Win Form
body: <p>I am trying to align one of my datagrid column of "Amount" to right side but unable to do so while trying to create PDF using itextsharp. All the columns are left aligned, some colums should be left aligned and the last column should be right aligned. Please help</p>
  
  <p>Below listed is the code.</p>
  
  <pre><code>PdfPTable pdfTable = new PdfPTable(dataGridView1.ColumnCount);
              pdfTable.SetWidths(new float[] { 5f, 10f, 10f, 7f, 9f });
              pdfTable.DefaultCell.Padding = 3;
              pdfTable.WidthPercentage = 90;
              pdfTable.HorizontalAlignment = Element.ALIGN_LEFT;
              pdfTable.DefaultCell.BorderWidth = 1;
  
  foreach (DataGridViewColumn column in dataGridView1.Columns)
              {
  
                  PdfPCell cell = new PdfPCell(new Phrase(column.HeaderText,     fontTitle2));
                  cell.BackgroundColor = new iTextSharp.text.BaseColor(240, 240, 240);
                  cell.HorizontalAlignment = Element.ALIGN_CENTER;
                  pdfTable.AddCell(cell);
              }
  
   foreach (DataGridViewRow row in dataGridView1.Rows)
              {
                  foreach (DataGridViewCell cell in row.Cells)
                  {
  
                      pdfTable.AddCell(new Phrase(cell.Value.ToString(),   fontTitle));
  
                  }
              }
  </code></pre>