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
An UltraGridPrintDocument can only be associated with a single UltraGrid and therefore each grid must be part of a separate print job.You may want to submit a suggestion for adding this - http://devcenter.infragistics.com/Protected/RequestFeature.aspx.
Does anyone have any suggestions on how to accomplish this; a work-around that is?
Thanks,
Ken Bobel
Ken, you can try using the UltraDocumentExporter and export all your grids to the same Report using the Documents.Report class. The UltraDocument exporter lets you export many grids to one section or to different sections for each grid in the Report as long as they are the same in width so that the page size does not change.
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.
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.