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
close icon

No margins / cell spacing

Hi!

I am trying to remove all margins or cell spacing in the Grid control.

The idea is to show a file, with a fixed font size. Then I would like to mark a couple of cells, and set a them "covered"/merged and I really would like it to look the same.

Is that possible? Or will it allways be a tiny space between the cells?

Daniel


1 Reply

RC Rajadurai C Syncfusion Team July 31, 2009 02:25 PM UTC

Hi Daniel,

Thanks for your interest in Syncfusion Products.

I apologize for the delay in responding.

From the update, it seems you would like to remove the borderlines in grid and display text in covered range of cells in same font. If it is, please try the following settings.

this.gridControl1.Properties.DisplayHorzLines = false;
this.gridControl1.Properties.DisplayVertLines = false;
this.gridControl1[1, 2].Text = "Syncfusion";
this.gridControl1.CoveredRanges.Add(GridRangeInfo.Cells(1, 2, 1, 5));
this.gridControl1[1, 2].HorizontalAlignment = GridHorizontalAlignment.Center;
this.gridControl1.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlways;

Here is a minimal sample in which this code has been implemented.
http://files.syncfusion.com/support/samples/Grid.Windows/7.3.0.20/F88457.zip

In this sample, three cells were merged and a text called "Syncfusion" is set to display in that range with same font. It doesn't show any cellspacing in between the characters in the merged cellrange thereby giving the look of single cell.

If this is not the one you tried to insist, please let me clear with some more details or a screenshot showing the appearance you would like to have with gridcontrol.

Regards,
Rajadurai

Loader.
Live Chat Icon For mobile
Up arrow icon