Hi,
I need to place Itextsharp table in fixed position & need only vertical gridlines.
could u please help how do i do this?
Thanks.
int columnCount = PrintGv.Columns.Count;
int rowCount = PrintGv.Rows.Count;
int tableRows = rowCount + 3;
iTextSharp.text.Table grdTable = new iTextSharp.text.Table(columnCount, tableRows);
grdTable.BorderWidth = 1;
grdTable.BorderColor = new Color(0, 0, 255);
grdTable.Cellpadding = 1;
grdTable.Cellspacing = 1;
grdTable.AddCell("ItemNo");
grdTable.AddCell("Qty");
grdTable.AddCell("Description");
for (int rowCounter = 0; rowCounter < rowCount; rowCounter++)
{
for (int columnCounter = 0; columnCounter < columnCount; columnCounter++)
{
string strValue = PrintGv.Rows[rowCounter].Cells[columnCounter].Text;
grdTable.AddCell(strValue);
}
}
Doc.Add(grdTable);