GrapeCity MultiRow Windows Forms Documentation
Custom Printing

You can use the GcMultiRow.Document property to customize printing while using the print control of the .NET Framework.

Page Setup

You can get the user's result if you display the print preview using the PageSetupDialog control.

Using Code

This example uses the PageSetupDialog control.

[VB]

Imports System.Drawing.Printing

Dim document As PrintDocument = New PrintDocument()
GcMultiRow1.Document = document
Using pageSetupDialog As PageSetupDialog = New PageSetupDialog()
    pageSetupDialog.Document = document
    If pageSetupDialog.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then
        Console.WriteLine("OK was clicked.")
    Else
        Console.WriteLine("Cancel was clicked.")
    End If
End Using

[CS]

using System.Drawing.Printing;

PrintDocument document = new PrintDocument();
gcMultiRow1.Document = document;
using (PageSetupDialog pageSetupDialog = new PageSetupDialog())
{
    pageSetupDialog.Document = document;
    if (pageSetupDialog.ShowDialog(this) == DialogResult.OK)
        Console.WriteLine("OK was clicked.");
    else
        Console.WriteLine("Cancel was clicked.");
}
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options