diff --git a/ExexForm2/Form1.cs b/ExexForm2/Form1.cs index 6f57a66..1cc6726 100644 --- a/ExexForm2/Form1.cs +++ b/ExexForm2/Form1.cs @@ -91,7 +91,7 @@ namespace ExexForm2 var rowHeights = new List { 20, 20 }; var mergeCells = new List<(int startRow, int endRow, int startColumn, int endColumn)> { - (0, 0, 0, 1) // Объединение первых двух столбцов в первой строке + //(0, 0, 0, 1) // Объединение первых двух столбцов в первой строке }; generator.GeneratePdf(fileName, "Example Document", mergeCells, rowHeights, headers, propertyNames, data1); diff --git a/Library14Petrushin/PdfColGroupTable.cs b/Library14Petrushin/PdfColGroupTable.cs index 5e42452..4774d2e 100644 --- a/Library14Petrushin/PdfColGroupTable.cs +++ b/Library14Petrushin/PdfColGroupTable.cs @@ -67,12 +67,12 @@ namespace Library14Petrushin x += columnWidth; // Отрисовка данных - for (int row = 0; row < data.Count; row++) + for (int col = 0; col < data.Count; col++) { - var item = data[row]; - for (int col = 0; col < propertyNames.Count; col++) + for (int row = 0; row < propertyNames.Count; row++) { - var property = item.GetType().GetProperty(propertyNames[col]); + var item = data[col]; + var property = item.GetType().GetProperty(propertyNames[row]); if (property != null) { var value = property.GetValue(item)?.ToString() ?? string.Empty;