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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to hide the Grid cell's borders, column and row headers while printing?

Platform: WinForms |
Control: GridControl

You can hide the Grid cell's borders and column and row headers while printing by setting the following properties.


//To hide cell borders and headers while printing.
this.gridControl1.Model.Properties.PrintHorzLines = false; 
this.gridControl1.Model.Properties.PrintVertLines = false; 
this.gridControl1.Model.Properties.PrintFrame = false; 
this.gridControl1.Model.Properties.PrintColHeader = false; 
this.gridControl1.Model.Properties.PrintRowHeader = false;



'To hide cell borders and headers while printing.
Me.gridControl1.Model.Properties.PrintHorzLines = False
Me.gridControl1.Model.Properties.PrintVertLines = False
Me.gridControl1.Model.Properties.PrintFrame = False
Me.gridControl1.Model.Properties.PrintColHeader = False
Me.gridControl1.Model.Properties.PrintRowHeader = False

The following is the screenshot for print preview dialog after removing the CellBorder and Row and Column headers.

Showing cellborder, row and column headers are hidden in printpreview

Sample Link:


C#: Hiding while printing CS

VB: Hiding while printing VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
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