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

How can I change the colors of ShowGroupDropArea?

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?

4 Replies

AD Administrator Syncfusion Team September 10, 2004 12:41 PM UTC

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;


AD Administrator Syncfusion Team September 10, 2004 04:34 PM UTC

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; > >


AD Administrator Syncfusion Team September 10, 2004 08:11 PM UTC

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


AD Administrator Syncfusion Team September 13, 2004 05:08 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon