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

Collaps Borders

Thread ID:





52635 Dec 1,2006 08:44 AM UTC Mar 13,2007 07:28 AM UTC WinForms 5
Tags: GridControl
Administrator [Syncfusion]
Asked On December 1, 2006 08:44 AM UTC


Is there any way to collaps borders of to cells?

cell 1 and cell 2 have the following borders:
left, top, bottom, right --> thin

now, the right border (cell 1) and the left border (cell 2) do not collaps and it look like a thik border? (see attachement)

any idea?



Administrator [Syncfusion]
Replied On December 1, 2006 01:25 PM UTC

Hi Boris,

Use the Style.Borders property to change the border of the cell in a grid. Here is a code snippet to show this.

//Collapse the all cell borders in a grid
this.gridControl1.TableStyle.Borders.All = new GridBorder(GridBorderStyle.None);

//Enable the particular cell border and collapse the Right border.
this.gridControl1[2,2].Borders.All = new GridBorder(GridBorderStyle.Solid);
this.gridControl1[2,2].Borders.Right = new GridBorder(GridBorderStyle.None);

//Enable the particular cell border and collapse the left border..
this.gridControl1[2,3].Borders.All= new GridBorder(GridBorderStyle.Solid);
this.gridControl1[2,3].Borders.Left = new GridBorder(GridBorderStyle.None);

If you want to disable the cell border in a grid, you need to set the ShowCurrentCellBorderBehavior property to GridShowCurrentCellBorder.HideAlways.

this.gridControl1.Model.Options.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlways;

Here is a sample.

Best Regards,

Boris Jansen
Replied On March 5, 2007 04:13 PM UTC

mhhhhh.... it doesn`t work!???

here my steps:

first i create a template and set the defaultgridborderstyle = notset

during my programm, i load the template, put data into the grid, and set the borderstyle only for cells with data:

Dim style As GridStyleInfo = New GridStyleInfo()
style.Borders.Left = New GridBorder(GridBorderStyle.Solid, Color.Black, GridBorderWeight.ExtraThin)
style.Borders.Top = New GridBorder(GridBorderStyle.Solid, Color.Black, GridBorderWeight.ExtraThin)
style.Borders.Right = New GridBorder(GridBorderStyle.NotSet)
style.Borders.Bottom = New GridBorder(GridBorderStyle.NotSet)

Dim range As GridRangeInfo = GridRangeInfo.Cells(Top, Left, Bottom, Right)
Grid.ChangeCells(range, style)

now, the gridborderstyle is set for the grid and it looks very well.

but, if i save the whole grid to excel (using xlsio), all borders in excel are thick. the borderrange in excel is ok but not the borderstyle?

any idea?

Boris Jansen
Replied On March 6, 2007 01:52 PM UTC


for better understanding
please see attachement!

fill data into grid

press button1:
save grid to excel

all borders in excel a thick

Best Regards,


Administrator [Syncfusion]
Replied On March 6, 2007 09:54 PM UTC

Hi Boris,

We are currently examining the issue in detail and let you know the points by tomorrow EST. We sincerely rationalize for this time delay.

Thank you for being patience.

Best regards,

Administrator [Syncfusion]
Replied On March 13, 2007 07:28 AM UTC

Any Idea at this moment?


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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