)
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

How to hide the currentcell border in header cells?

Platform: WinForms |
Control: GridControl |
Published Date: January 3, 2016 |
Last Revised Date: May 28, 2019

In order to hide the currentcell border while clicking on a HeaderCell, DrawCurrentCellBorder event can be used. For better understanding, please refer the below image,

Showing hide the current cell border while click a header cell

C#

//Form1()
this.gridControl1.DrawCurrentCellBorder += new GridDrawCurrentCellBorderEventHandler(gridControl1_DrawCurrentCellBorder);
void gridControl1_DrawCurrentCellBorder(object sender, GridDrawCurrentCellBorderEventArgs e)
  {
     //Chekcing whether currentcell is header cell
     if (e.Style.CellType == "Header")
     {
          //Canceling the currentcell border
          e.Cancel = true;
      }
  }

 

VB

'Form1()
AddHandler gridControl1.DrawCurrentCellBorder, AddressOf gridControl1_DrawCurrentCellBorder
 
Private Sub gridControl1_DrawCurrentCellBorder(ByVal sender As Object, ByVal e As GridDrawCurrentCellBorderEventArgs)
      'Chekcing whether currentcell is header cell
      If e.Style.CellType Is "Header" Then
          'Canceling the currentcell border
          e.Cancel = True
      End If
End Sub
 

 

Screenshot

Showing unhide the current cell border

Sample:

CS: CurrentCell_Border_CS

VB: CurrentCell_Border_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