)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

What are all the printing options available in the WinForms GridControl, GridGroupingControl and GridDataBoundGrid?

Platform: WinForms |
Control: GridControl |
Published Date: May 13, 2016 |
Last Revised Date: February 11, 2020
Tags: printing

Printing

The Essential grid provides support to print column headers, row headers, horizontal and vertical lines through corresponding properties used in the control.

GridControl

Printing Column and Row Headers

In order to print the column header and row header, the PrintColumnHeader and PrintRowHeader property can be used respectively.

C#

//To print with Column Header
this.gridControl1.PrintColumnHeader = true;
 
//To print with Row Header
this.gridControl1.PrintRowHeader = true;

VB

'To print with Column Header
Me.gridControl1.PrintColumnHeader = True
 
'To print with Row Header
Me.gridControl1.PrintRowHeader = True

Printing Horizontal and Vertical Lines

In order to print the horizontal and vertical lines of the grid, the PrintHorizontalLines and PrintVerticalLines property can be used.

C#

//To print Horizontal Lines
this.gridControl1.PrintHorizontalLines = true;
 
//To print Vertical Lines
this.gridControl1.PrintVerticalLines = true;

VB

'To print Horizontal Lines
Me.gridControl1.PrintHorizontalLines = True
 
'To print Vertical Lines
Me.gridControl1.PrintVerticalLines = True

GridGroupingControl

Printing Column and Row Headers

In order to print the column header and row header, the PrintColumnHeader and PrintRowHeader property can be used respectively.

C#

//To print with column headers
this.gridGroupingControl1.PrintColumnHeader = true;
 
//To print with row headers
this.gridGroupingControl1.PrintRowHeader = true;

VB

'To print with column headers
Me.gridGroupingControl1.PrintColumnHeader = True
 
'To print with row headers
Me.gridGroupingControl1.PrintRowHeader = True

Printing Horizontal and Vertical Lines

In order to print the horizontal and vertical lines of the grid, the PrintHorizontalLines and PrintVerticalLines property can be used.

C#

//To print horizontal lines
this.gridGroupingControl1.PrintHorizontalLines = true;
 
//To print vertical lines
this.gridGroupingControl1.PrintVerticalLines = true;

VB

'To print horizontal lines
Me.gridGroupingControl1.PrintHorizontalLines = True
 
'To print vertical lines
Me.gridGroupingControl1.PrintVerticalLines = True

 

Show the print preview dialog window

GridDataBoundGrid

Printing Column and Row Headers

In order to print the column header and row header, the PrintColumnHeader and PrintRowHeader property can be used respectively.

C#

//To print with column headers
this.gridDataBoundGrid1.PrintColumnHeader = true;
 
//To print with row headers
this.gridDataBoundGrid1.PrintRowHeader = true;

VB

'To print with column headers
Me.gridDataBoundGrid1.PrintColumnHeader = True
 
'To print with row headers
Me.gridDataBoundGrid1.PrintRowHeader = True

Printing Horizontal and Vertical Lines

In order to print the horizontal and vertical lines of the grid, the PrintHorizontalLines and PrintVerticalLines property can be used.

C#

//To print horizontal lines
this.gridDataBoundGrid1.PrintHorizontalLines = true;
 
//To print vertical lines
this.gridDataBoundGrid1.PrintVerticalLines = true;

VB 

'To print horizontal lines
Me.gridDataBoundGrid1.PrintHorizontalLines = True
 
'To print vertical lines
Me.gridDataBoundGrid1.PrintVerticalLines = True

 

Show the print preview dialog

Samples:

C#: PrintingOptions_CS

VB: PrintingOptions_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon