grid.Headers[0].Style.TextPen = PdfPens.Red;
grid.Headers[0].Cells[0].Style.BackgroundBrush = PdfBrushes.LightBlue;
grid.Rows[0].Cells[0].Style.BackgroundImage = PdfImage.FromFile("../../Data/icon.png");
table.BeginRowLayout += new BeginRowLayoutEventHandler(table_StartRowLayout);
void table_StartRowLayout(object sender, BeginRowLayoutEventArgs args)
{
int rowIndex = args.RowIndex;
if (rowIndex == -1) // -1 for header row
{
int[] spanMap = new int[count];
//Set span for first and thrid cells in a row of 5 cells.
spanMap[0] = 2;
spanMap[2] = 3;
args.ColumnSpanMap = spanMap;
}
}
grid.Headers[0].Cells.ColumnSpan = 2;