Hi, I inputted a table onto my document with 1 row and 2 columns.
I then inputted a Custom Merge Field in column 2. My Custom Merge field inputs a table. Code is below
protected override DocumentFragment GetResultFragment(){ UniversalDTO universalDTO = this.Document.MailMergeDataSource.CurrentItem as UniversalDTO; if (universalDTO == null) { return null; } if (this.PropertyPath == "Collaterals") { Table table = new Table(); foreach (var coillateral in universalDTO.Collaterals) { Span span = new Span(coillateral.Type.Value); span.FontSize = 11.5; Paragraph paragraph = new Paragraph(); paragraph.Inlines.Add(span); Span span2 = new Span(coillateral.Description); span2.FontSize = 11.5; Paragraph paragraph2 = new Paragraph(); paragraph2.Inlines.Add(span2); TableCell cell = new TableCell(); cell.Blocks.Add(paragraph); cell.Borders = new TableCellBorders(new Border(1, BorderStyle.Single, Colors.Transparent)); TableCell cell2 = new TableCell(); cell2.Blocks.Add(paragraph2); cell2.Borders = new TableCellBorders(new Border(1, BorderStyle.Single, Colors.Transparent)); TableRow row = new TableRow(); row.Cells.Add(cell); row.Cells.Add(cell2); table.AddRow(row); } Section section = new Section(); section.Blocks.Add(table); RadDocument document = new RadDocument(); document.Sections.Add(section); document.MeasureAndArrangeInDefaultSize(); return new DocumentFragment(document); } return null;}
The issue I'm having is depicted by the image below, there's a space ontop of the nested table. If tried to delete in the document, it deletes the table. That empty line can be deleted in word though.
http://imgur.com/cf22ee44-9cdd-4840-b045-a9500c8d0569
Code View
http://imgur.com/LQirves