Hi,
I am trying to add a grid caption or band header that is taking several lines. So far I haven't been very successful The grid caption seemed to work OK at first, unfortunately it does not get exported when I export the grid to PDF. The bad header does get exported, however I haven't been able to increase the lines of text it takes.
Has anybody tried to do something similar?
Thanks,
Matei
Hi Matei,
Does it matter to you if the grid header is exporting to PDF in a box that looks like a header?
If not, then the simplest solution would be to simply write the text into the PDF document before exporting the grid into it. It won't look like a grid header, but I don't know if that matters to you. If it does, then you could probably get it to look pretty close with a little extra code.
Here's how you would do it:
string filename = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "test.pdf"); Report report = new Report(); ISection section = report.AddSection(); IText text = section.AddText(); text.AddContent(this.ultraGrid1.Text); this.ultraGridDocumentExporter1.Export(this.ultraGrid1, section); report.Publish(filename, FileFormat.PDF); Process.Start(filename);
Thanks Mike, that works well enough for my purpose.