G
Guest
I am having trouble printing in landscape, when i print directly from the grid.
This is how my code looks rightnow:
Private Sub cmdPrintFromGrid_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmdPrintFromGrid.Click
Dim prtDoc As New Printing.PrintDocument()
prtDoc.DefaultPageSettings.Landscape = True
Me.UltraGrid1.Print(Me.UltraGrid1.DisplayLayout, prtDoc)
End Sub
Private Sub UltraGrid1_InitializePrint(ByVal sender As Object, ByVal e As
Infragistics.Win.UltraWinGrid.CancelablePrintEventArgs) Handles
UltraGrid1.InitializePrint
e.DefaultLogicalPageLayoutInfo.FitWidthToPages = 1
End Sub
I get printed two pages all the time. In one page I have the contents of
the grid (what i want) and in the other page I get the two last colums, but
they where already in the first page. something strange.
This is how my code looks rightnow:
Private Sub cmdPrintFromGrid_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles cmdPrintFromGrid.Click
Dim prtDoc As New Printing.PrintDocument()
prtDoc.DefaultPageSettings.Landscape = True
Me.UltraGrid1.Print(Me.UltraGrid1.DisplayLayout, prtDoc)
End Sub
Private Sub UltraGrid1_InitializePrint(ByVal sender As Object, ByVal e As
Infragistics.Win.UltraWinGrid.CancelablePrintEventArgs) Handles
UltraGrid1.InitializePrint
e.DefaultLogicalPageLayoutInfo.FitWidthToPages = 1
End Sub
I get printed two pages all the time. In one page I have the contents of
the grid (what i want) and in the other page I get the two last colums, but
they where already in the first page. something strange.