Shovan Saha

Shovan Saha

  • NA
  • 321
  • 91.2k

C# code and iTextSharp report problem on column size

Apr 27 2017 12:37 PM
I am new in C#. An desktop application in visual studio 2015, database MS access 2007. I have used the code as:
 
//Adding Header row
foreach (DataGridViewColumn column in dataGridView1.Columns)
{
PdfPCell cell = new PdfPCell(new Phrase(column.HeaderText));
pdfTable.AddCell(cell);
}
//Adding DataRow
foreach (DataGridViewRow row in dataGridView1.Rows)
{
foreach (DataGridViewCell cell in row.Cells)
{
pdfTable.AddCell(cell.Value.ToString());
}
}
And Found the result as:
 
I want these(In iTextSharp Report):
1.  ID is based on database. I want a new serial when I will make this report on the left side of ID.
2. PaymentDate column will not show the time.
3. I want to resize every column, change font type and font size.
 
Please help me in code or example. 
 
 
 

Answers (1)