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.
Unfortunately, activation email could not send to your email. Please try again.

Collaps Borders

Thread ID:

Created:

Updated:

Platform:

Replies:

52635 Dec 1,2006 03:44 AM Mar 13,2007 03:28 AM Windows Forms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On December 1, 2006 03:44 AM

Hi!

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?

regards,
boris


thikborder.zip

Administrator [Syncfusion]
Replied On December 1, 2006 08:25 AM

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.
GCchangeBorder.zip

Best Regards,
Haneef

Boris Jansen
Replied On March 5, 2007 11:13 AM

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 08:52 AM

Hello!

for better understanding
please see attachement!

onload:
fill data into grid

press button1:
save grid to excel

result:
all borders in excel a thick

Best Regards,
Boris


gridtest3.zip

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

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,
Haneef

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

Any Idea at this moment?

CONFIRMATION

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.

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.

;