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

GridControl without headers

Thread ID:





61163 May 18,2007 05:56 AM UTC May 18,2007 07:33 AM UTC WinForms 1
Tags: GridControl
Dan Dorey
Asked On May 18, 2007 05:56 AM UTC

I'm using SyncFusion and VS2005 (.NET 2.0)

I'm using a GridControl and I've removed the column headers. The problem is that the top row doesn't have a border along the top so those cell aren't closed off.

I can't set the border one the whole control since it's docked (full) on the panel behind.

Any thoughts? I can include a screen shot if that isn't clear.


haneefm [Syncfusion]
Replied On May 18, 2007 07:33 AM UTC

Hi Dan,

There is no built-in support for setting the grid's borders in a GridControl. You could derive the Windows.Panel control and add a grid to it. You could set the Panel''s DockPadding.All = 1 and set the panel''s BackColor to the color you want to see. Also set the BorderStyle on both the grid and panel to none. Below is a code snippet

public class MyGridControl : Panel
public GridControl Grid = new GridControl();
public MyGridControl():base()
this.DockPadding.All = 1;
this.BackColor = Color.SlateBlue;
this.BorderStyle = BorderStyle.None;
this.Grid.Dock = DockStyle.Fill;
this.Grid.BorderStyle = BorderStyle.None;

If you want to set a row border in a grid , you can try the below code.

this.grid.Model.RowStyles[3].Borders.All = new GridBorder(GridBorderStyle.Solid);

Here is a forum thread that discuss with the different technique for drawing the borders in a grid.

Best regards,


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