PrintGrid Method
Description
Prints the current Grid view.
Syntax
Public Sub PrintGrid( _
ByVal lHDC As Integer _
)
Parameters
- lHDC: A device context for a Printer object. Use 0 to let the GridControl auto-detect printer settings and display a dialog for printing.
Remarks
With a CommonDialog control, the CommonDialog.hDC property returns a device context for the printer selected in the Print dialog box when the cdlReturnDC flag is set. See the sample below for more on how to do this.
Example
This sample illustrates how to print the current Grid view.
' Printing using the default printer dialog
wndGridControl.PrintGrid 0
' Printing using the CommonDialog Control
On Error Resume Next
With dlgCommonDialog
.DialogTitle = "Print"
.CancelError = True
.Flags = cdlPDReturnDC + cdlPDNoPageNums
.ShowPrinter
If Err <> MSComDlg.cdlCancel Then
wndGridControl.PrintGrid .hDC
End If
End With
See Also
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.