Spread Windows Forms 7.0 Product Documentation
ShowGrid Property
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > PrintInfo Class : ShowGrid Property

Glossary Item Box

Gets or sets whether to print the grid lines.


Visual Basic (Declaration) 
Public Property ShowGrid As Boolean
Visual Basic (Usage)Copy Code
Dim instance As PrintInfo
Dim value As Boolean
instance.ShowGrid = value
value = instance.ShowGrid
public bool ShowGrid {get; set;}

Property Value

Boolean: true to print the grid lines; false otherwise


Specify which grid lines the sheet displays using the SheetView's HorizontalGridLine and VerticalGridLine properties. If the sheet does not display horizontal or vertical grid lines, the grid lines do not print, no matter what the setting of this property.

You can specify the colors for the grid lines using the GridLine object's colors properties. However, whether the grid lines print in color depends on the setting of the ShowColor property and the available printer.


This example shows how to define the settings for customizing the printed page layout.
C#Copy Code
// Define the printer settings
FarPoint.Win.Spread.PrintInfo printset = new FarPoint.Win.Spread.PrintInfo();
FarPoint.Win.Spread.PrintMargin printmar = new FarPoint.Win.Spread.PrintMargin();

printmar.Left = 10;
printmar.Right = 10;
printmar.Top = 20;
printmar.Bottom = 40;

printset.Centering = FarPoint.Win.Spread.Centering.Both;
printset.FirstPageNumber = 1;
printset.Margin = printmar;
printset.Opacity = 60;
printset.Orientation = FarPoint.Win.Spread.PrintOrientation.Portrait;
printset.ShowBorder = false;
printset.ShowColor = false;
printset.ShowColumnHeader = FarPoint.Win.Spread.PrintHeader.Hide;
printset.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide;
printset.ShowGrid = true;
printset.ShowShadows = false;
printset.ZoomFactor = 2;

// Assign the printer settings to the sheet and print it
fpSpread1.Sheets[0].PrintInfo = printset;
Visual BasicCopy Code
' Define the printer settings
Dim printset As New FarPoint.Win.Spread.PrintInfo()
Dim printmar As New FarPoint.Win.Spread.PrintMargin

printmar.Left = 10
printmar.Right = 10
printmar.Top = 20
printmar.Bottom = 40

printset.Centering = FarPoint.Win.Spread.Centering.Both
printset.FirstPageNumber = 1
printset.Margin = printmar
printset.Opacity = 60
printset.Orientation = FarPoint.Win.Spread.PrintOrientation.Portrait
printset.ShowBorder = False
printset.ShowColor = False
printset.ShowColumnHeader = FarPoint.Win.Spread.PrintHeader.Hide
printset.ShowRowHeader = FarPoint.Win.Spread.PrintHeader.Hide
printset.ShowGrid = True
printset.ShowShadows = False
printset.ZoomFactor = 2

' Assign the printer settings to the sheet and print it
FpSpread1.Sheets(0).PrintInfo = printset


Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.