PrintGrid method
Prints the data grid.
Syntax
DataGrid1
.PrintGrid
(UseLandscapeMode
, ShowPrinterSelection
, PrintSelectArrange
)where
DataGrid1
- is the name of a data grid object or an expression that evaluates to a data gird object.UseLandscapeMode
- is a parameter of the type Boolean that can be set to one of the following:- True. Prints the data grid in landscape format (wide).
- False. Prints the data grid in portrait format (tall).
ShowPrinterSelection
- is a parameter of the type Boolean that can be set to one of the following:- True. Opens a print dialog box and allows the operator to select a printer.
- False. Prints directly to the default printer without displaying a print dialog box.
PrintSelectArrange
- is a parameter of the type Boolean that can be set to one of the following:- True. Prints the current selected page.
- False. Prints all the pages.
Example
This example prints the current selected page of data grid in landscape (wide) format, and sends the print command directly to the default printer without opening a print dialog box.
Private Sub btnPrintGrid() DataGrid1.PrintGrid True, False, True End Sub
Provide Feedback