Me.UltraGridPrintDocument1.Grid = Me.UltraGrid1
How, or is there a way to assign or add multiple grids to the print document and what might that way be? Can they be combined and yet achieve the same visual form appearance? Not sure that creating my own control and inheriting from the UltraGridPrintDocument will help.
- Ken
As mentioned in another forum post http://forums.infragistics.com/forums/p/16057/58546.aspx#58546, one way to accomplish this is by creating a composite PrintDocument that will print multiple PrintDocuments using Reflection to coordinate the print loop. http://www.csharp-examples.net/combine-multiple-printdocuments/.
This method will not allow you to print multiple grids on the same page, but it will allow you to chain the output of multiple UltraGridPrintDocuments together one after the other. This allows you to have concistent page numbering, and to share a single instance Print Settings (Margins, etc).
objGap.Height = New FixedHeight(50)
This code should be the code you need to add a gap between your grids.
Jose -
Thanks for the tip. This indeed works. Still trying to figure out how to add space between the grids, but this does indeed work. I am a little concerned that Andrew (the Infragistics employee) said this was not possible.
Anyway, thanks again for your help!
Yeah you can what you want to do by exporting the grids to the same section
Infragistics.Documents.Report.Section.ISection gridSection = report.AddSection();
{
header = gridSection.AddHeader();
header.Height = 25;
fontText = header.AddText(0, 0);
}
exporter.Export(grid, gridSection);
so here I am exporting 2 grids to the same section and they both fit in the same page and even if your first grid were to have more rows, it will still display them all.
Jose, Thanks for the suggestion. I actually experimented with this yesterday. Yes, it does allow you to 'add' multiple grids to 'print' at one time; however, from what I found - each grid gets printed on a separate page. Still not sure how/if possible to print multiple grids on a single page using DocumentExporter. Again, for example say I have 2 or 3 grids on a form (each of say 20 or 30 rows) these could easily fit onto one printed document; however, DocumentExporter would print each grid onto thir own page.