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

XP Style on grid borders

Thread ID:





49037 Sep 8,2006 10:24 PM UTC Sep 12,2006 12:43 PM UTC WinForms 2
Tags: Grouping
Alejandro Serrano
Asked On September 8, 2006 10:24 PM UTC

I know that maybe this topic has been solved, but I don''t find the solution in forums or KB.
I would like my Grids to show its border with Visual Styles. Not the cells or tables, that are fine, but the entire control border. If I set it to fixed single, it appears black. The effect I want to achieve is the same that in Common Controls: the border is drawn in a blue color.
I¡ve tried overriding WndProc, and, even though I get the results, the repainting gets sometimes messed. Is there an way to do it? (I''ve cheked ThemesEnabled is set to true)

Administrator [Syncfusion]
Replied On September 11, 2006 05:16 AM UTC

Hi Alejandro,

There is no built-in support for this in GridGroupingControl. 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 MyGroupingControl : Panel
public GridGroupingControl Grid = new GridGroupingControl();
public MyGroupingControl():base()
this.DockPadding.All = 1;
this.BackColor = Color.SlateBlue;
this.BorderStyle = BorderStyle.None;
this.Grid.Dock = DockStyle.Fill;
this.Grid.BorderStyle = BorderStyle.None;

For more details, see the attached sample.

Let me know if this helps.

Best Regards,

Alejandro Serrano
Replied On September 12, 2006 12:43 PM UTC

Well, not much really... :-(
The reason is that SlateBlue is good when the theme is Windows XP''s Blue Theme, but when any other is set, the visual appearance is not as good.


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