Hi all,in my UltraGrid I have an ultraGridDocumentExporter to export the Grid content in a PDF file. Is it possible to export in a predefinited pdf template (that has, for example, header and footer).
Thanks a lot.
Luigi
Thank you.
I have done.
What you need to do is add a Header to the section and then set Repeat to true:
ISectionHeader header = section.AddHeader();header.Repeat = true;
I have tested the above. But its only appear in the first page. I need this on all the page. Please help me on this.
Hi Luigi,
You don't need to declare a section variable. You want your text to be included in the same section the grid is being exporting into. So just use "e.Section".
I have put an
public ISection section;
declaration at the beginning of my class (after public partial class Form1 : Form.....)
and then modify the BeginExport like so:
private void ultraGridDocumentExporter1_BeginExport(object sender, BeginExportEventArgs e){ IText text = section.AddText(); text.AddContent("My UltraGrid Header"); foreach (UltraGridBand band in e.Layout.Bands) { switch (band.Index) { case 1: band.Hidden = true; break; default: band.Indentation = 0; break; } }}
In this moment I can't test it (I'm out of office, with not database).
Is it sufficent?