I have a grid that I would like to be able to print and also print preview. The grid may has many bands and expandable regions - these are not displayed properly when using the ultraPrintPreviewDialog control.
The call to wingrid.Print(displayLayout,printDoc) prints how I want it to (i.e. all rows including those not visible in collapsed regions) and also wingrid.PrintPreview(displayLayout,printDoc).
The problem with using PrintPreview() on the grid is that the viewer has a lot less functionality (and a win 95 look).
Is there a way to the displaylayout of the grid with the UltraPrintPreviewDialog so that it behaves in the same way as wingrid.Print() and wingrid.PrintPreview()?
Hi,
What kind of sample code are you looking for? Have you looked at the samples included in NetAdvantage?
i using the UltraGrid with the following version Infragistics2.Win.UltraWinGrid.v11.1
could you kindly give me a sample code for ultragrid printpreview.?
What version of the controls are you using?
This sounds like a bug that we recently fixed. Getting the latest service release will probably fix it.
How to get the latest service release - Infragistics Community
Hi
i had a serial number column in grid.
which shows rows in ascending order,
while print preview the grid shows the rows in random order( rows interchanged)
why the rows order interchanged in print preview.?
my coding is:
Dim pdSetup As New System.Drawing.Printing.PrintDocument()
Private Sub grdStockVerification_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles grdStockVerification.InitializeRow ' expand rows in band 0 Select Case e.Row.Band.Index Case 0 e.Row.Expanded = True End Select End Sub
Private Sub btnPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrint.Click ' display grid in Print Preview pdSetup.DefaultPageSettings.Landscape = True grdStockVerification.PrintPreview(grdStockVerification.DisplayLayout, pdSetup) End Sub
It works just as you said. Thanks a lot Mike!
Crystal.