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.

How can I change the colors of ShowGroupDropArea?

Thread ID:

Created:

Updated:

Platform:

Replies:

18850 Sep 10,2004 07:49 AM Sep 13,2004 01:08 PM Windows Forms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 10, 2004 07:49 AM

I have a grouping grid with the ShowGroupDropArea set to true. I don''t like the dark gray colors of that area. How can I set my own colors? Also, I''ve set the ListBoxSelectionMode to One and the row highlights with a black background. How can I change this color?

Administrator [Syncfusion]
Replied On September 10, 2004 08:41 AM

1) The droparea is a little grid. So, you can handle its PrepareViewStyleInfo event, and explicitly set a backcolor there. this.gridGroupingControl1.GridGroupDropArea.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(GridGroupDropArea_PrepareViewStyleInfo); //the handler private void GridGroupDropArea_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) { e.Style.BackColor = Color.Red; } 2) Make sure the AllowSelections property includes the AlphBlend flag. gcc.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended; gcc.TableOptions.AllowSelection = GridSelectionFlags.Any;

Administrator [Syncfusion]
Replied On September 10, 2004 12:34 PM

Thanks Clay, I tried your code to change the droparea''s background color and it worked...sort of. The problem remains that if I resize the form, the droparea''s background color (red) does not fill the complete band (at the top of the grid). It looks like the droparea is painted red for the form''s initial size, but, upon resizing the form larger, the droparea band is both red and dark gray. Is there anyway to have the entire droparea''s background color to be one color? Also, I set the Alphablend flag on but now I get no row highlight at all! What am I doing wrong? >1) The droparea is a little grid. So, you can handle its PrepareViewStyleInfo event, and explicitly set a backcolor there. > >this.gridGroupingControl1.GridGroupDropArea.PrepareViewStyleInfo += new GridPrepareViewStyleInfoEventHandler(GridGroupDropArea_PrepareViewStyleInfo); > > >//the handler >private void GridGroupDropArea_PrepareViewStyleInfo(object sender, GridPrepareViewStyleInfoEventArgs e) >{ > e.Style.BackColor = Color.Red; >} > > >2) Make sure the AllowSelections property includes the AlphBlend flag. > >gcc.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended; >gcc.TableOptions.AllowSelection = GridSelectionFlags.Any; > >

Administrator [Syncfusion]
Replied On September 10, 2004 04:11 PM

Try setting these two properties. this.gridGroupingControl1.GridGroupDropArea.Dock = DockStyle.Fill; this.gridGroupingControl1.GridGroupDropArea.Model.Properties.BackgroundColor = Color.Red; Here is a sample with the alpha blend selection set ok as well as coloring teh drop area. GGC_9672.zip

Administrator [Syncfusion]
Replied On September 13, 2004 01:08 PM

Thanks Clay. That did it! >Try setting these two properties. > >this.gridGroupingControl1.GridGroupDropArea.Dock = DockStyle.Fill; >this.gridGroupingControl1.GridGroupDropArea.Model.Properties.BackgroundColor = Color.Red; > > >Here is a sample with the alpha blend selection set ok as well as coloring teh drop area. >GGC_9672.zip > >

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.

;