Articles in this section
Category / Section

What are all the printing options available in the WinForms GridControl?

2 mins read

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


Conclusion

I hope you enjoyed learning about What are all the printing options available in the WinForms GridControl, GridGroupingControl and GridDataBoundGrid.

You can refer to our WinForms Grid feature tour page to know about its other groundbreaking feature representations. You can also explore our documentation to understand how to present and manipulate data.

For current customers, you can check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our ASP.NET MVC Chart and other ASP.NET MVC components.

If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!




Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied