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: November 16, 2018).
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 |
Published Date: April 30, 2011 |
Last Revised Date: May 28, 2019

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

C#

//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;

 

VB

'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.
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