I am trying to add a grid to a section header and it isn't working. The closes I have gotten is seeing part of the date, it is either being cut off by the band which fills up the section, or it goes too high on the page and the top is cut off by something, though there is still space. Here is my code:
section.PageMargins.All = 40; ISectionHeader header = section.AddHeader(); IGrid headerGrid = header.AddGrid(0, -18); IGridColumn column = headerGrid.AddColumn(); column.Width = new RelativeWidth(50); column = headerGrid.AddColumn(); column.Width = new RelativeWidth(30); column = headerGrid.AddColumn(); column.Width = new RelativeWidth(20); IGridRow row = headerGrid.AddRow(); row.AddCell().AddQuickText("Resident: " + resAsmtDoc.ResAssessment.ResidentId.ToString()); row.AddCell().AddQuickText("Identifier: " + resAsmtDoc.ResAssessment.ResidentId.ToString()); row.AddCell().AddQuickText("Date: " + resAsmtDoc.ResAssessment.AssessmentDate.ToString("d"));
Hi,
It's hard to tell from a code snippet, but I don't see anything here that sets the Height on the Header. I think you might need to determine the height of the grid yourself and set the height of the header to match. Or maybe set the height on the header to AutoHeight.