How would I export a PDF with a title and the contents of a grid? The documentation seems practically non-existant. In my code behind I have:
protected void ExportClassListButton_Click(object sender, Infragistics.WebUI.WebDataInput.ButtonEventArgs e)
{
var report = new Report();
ISection section = report.AddSection();
var header = section.AddText(); header.AddContent( "My Title" )
header.AddContent( "My Title" )
; header.Alignment =
header.Alignment =
new TextAlignment(Alignment.Center);
WebDocumentExporter.Export( MyGrid, report, body );
}
However I end up with a page break between the title and the grid.
Hello dharrington ,
Thank you for posting in our forum.
It seems that different sections represent different pages so you should add the grid and the title to the same section. If you need to set some space between them you can add a gap object. For example your code could look like this:
protected void Button1_Click(object sender, EventArgs e)
var header = section.AddText();
header.AddContent("My Title");
header.Alignment = new TextAlignment(Alignment.Center);
IGap gap = section.AddGap();
gap.Height = new FixedHeight(100);
this.WebDocumentExporter1.Export(this.WebDataGrid1, report, section);
Please refer to the attached sample and let me know if you have any questions or concerns.
Best Regards,
Maya Kirova
Developer Support Engineer
Infragistics, Inc.
http://www.infragistics.com/support