public static void AddSummaryRow(this PdfGrid table,
IList<ColumnAttributes> pdfColumnsDefinitions,
string summaryProperty,
string labelProperty,
CellAttributes summaryCell,
CellAttributes labelCell,
CellAttributes emptyCell,
IColumnItemsTemplate itemsTemplate)
{
foreach (var col in pdfColumnsDefinitions)
{
if (col.PropertyName == summaryProperty)
{
table.AddCell(summaryCell.CreateSafePdfPCell(itemsTemplate));
}
else if (col.PropertyName == labelProperty)
{
table.AddCell(labelCell.CreateSafePdfPCell(itemsTemplate));
}
else
{
table.AddCell(emptyCell.CreateSafePdfPCell(itemsTemplate));
}
}
}