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.
Syncfusion Feedback

Group cells; how to show with no special style at all

Thread ID:

Created:

Updated:

Platform:

Replies:

20036 Oct 8,2004 08:27 AM UTC Oct 8,2004 01:43 PM UTC Windows Forms 8
loading
Tags: Grouping
Dominic Morris
Asked On October 8, 2004 08:27 AM UTC

I''d like my group caption rows to show up with no special back-color formatting or tab-like roll-overs, but still to retain the +- icon. I.e. they should appear just like any other cell in the grid. What''s the best way?? Thanks, D.

Dominic Morris
Replied On October 8, 2004 10:32 AM UTC

The best that I''ve managed is: this.gridGroupingControl1.TableDescriptor.Appearance.GroupCaptionCell.CellType = "EmptyCell"; This really, nearly works! The group caption cell(s) is/are drawn with the same back and forecolor as the other cells, but there''s a _single pixel_ line drawn at the TOP of the group caption cell(s). That really, really sucks. Any way around that? D. >I''d like my group caption rows to show up with no special back-color formatting or tab-like roll-overs, but still to retain the +- icon. I.e. they should appear just like any other cell in the grid. > >What''s the best way?? > >Thanks, >D.

Administrator [Syncfusion]
Replied On October 8, 2004 01:04 PM UTC

Hi Domininc, the default settings are as follows: // Group Caption style = GroupCaptionCell; style.Borders.Top = new GridBorder(GridBorderStyle.Solid, SystemColors.ControlDarkDark); style.BackColor = SystemColors.Control; style.CellType = "Header"; // Group Caption PlusMinus style = GroupCaptionPlusMinusCell; style.Borders.Bottom = GridBorder.Empty; style.Borders.Top = new GridBorder(GridBorderStyle.Solid, SystemColors.Control); style.CellType = "PushButton"; style.Enabled = true; So what you could do is get rid of those settings for by calling GridTableCellStyleInfo style = this.gridGroupingControl1.TableDescriptor.Appearance.GroupCaptionCell; style.ResetBorders(); style.ResetInterior(); style.CellType = "Static"; Stefan

Dominic Morris
Replied On October 8, 2004 01:24 PM UTC

Thanks Stefan, I''ve tried that, but unfortunately, the single pixel line on the top of the cell remains. :( Not the end of the world, but a shame. Another question I''m struggling with at the moment is how to specify the height of each row; the group caption row is currently slightly taller than the main data rows, and it looks a bit wrong. But I can''t find anything in the object model to do this... The attached screenshot hopefully demonstrates both issues. Thanks again for your help. D. >Hi Domininc, > >the default settings are as follows: > > > // Group Caption > style = GroupCaptionCell; > style.Borders.Top = new GridBorder(GridBorderStyle.Solid, SystemColors.ControlDarkDark); > style.BackColor = SystemColors.Control; > style.CellType = "Header"; > > // Group Caption PlusMinus > style = GroupCaptionPlusMinusCell; > style.Borders.Bottom = GridBorder.Empty; > style.Borders.Top = new GridBorder(GridBorderStyle.Solid, SystemColors.Control); > style.CellType = "PushButton"; > style.Enabled = true; > > >So what you could do is get rid of those settings for by calling > > >GridTableCellStyleInfo style = this.gridGroupingControl1.TableDescriptor.Appearance.GroupCaptionCell; >style.ResetBorders(); >style.ResetInterior(); >style.CellType = "Static"; > > >Stefan > demo_5018.zip

Dominic Morris
Replied On October 8, 2004 01:27 PM UTC

Ah! Solved the border issue: GridTableCellStyleInfo style = this.gridGroupingControl1.TableDescriptor.Appearance.GroupCaptionCell; style.Borders.Top = new GridBorder( GridBorderStyle.None ); However, the different height rows problem remains... :( D. >Thanks Stefan, > >I''ve tried that, but unfortunately, the single pixel line on the top of the cell remains. :( > >Not the end of the world, but a shame. > >Another question I''m struggling with at the moment is how to specify the height of each row; the group caption row is currently slightly taller than the main data rows, and it looks a bit wrong. But I can''t find anything in the object model to do this... > >The attached screenshot hopefully demonstrates both issues. > >Thanks again for your help. > >D. > > > >>Hi Domininc, >> >>the default settings are as follows: >> >> >> // Group Caption >> style = GroupCaptionCell; >> style.Borders.Top = new GridBorder(GridBorderStyle.Solid, SystemColors.ControlDarkDark); >> style.BackColor = SystemColors.Control; >> style.CellType = "Header"; >> >> // Group Caption PlusMinus >> style = GroupCaptionPlusMinusCell; >> style.Borders.Bottom = GridBorder.Empty; >> style.Borders.Top = new GridBorder(GridBorderStyle.Solid, SystemColors.Control); >> style.CellType = "PushButton"; >> style.Enabled = true; >> >> >>So what you could do is get rid of those settings for by calling >> >> >>GridTableCellStyleInfo style = this.gridGroupingControl1.TableDescriptor.Appearance.GroupCaptionCell; >>style.ResetBorders(); >>style.ResetInterior(); >>style.CellType = "Static"; >> >> >>Stefan >> > >demo_5018.zip > >

Administrator [Syncfusion]
Replied On October 8, 2004 01:36 PM UTC

Correction. You need to do this: this.gridGroupingControl1.Appearance.GroupCaptionCell.BackColor = this.gridGroupingControl1.Appearance.RecordFieldCell.BackColor; this.gridGroupingControl1.Appearance.GroupCaptionCell.Borders.Top = new GridBorder(GridBorderStyle.Standard); this.gridGroupingControl1.Appearance.GroupCaptionCell.CellType = "Static"; Stefan

Administrator [Syncfusion]
Replied On October 8, 2004 01:38 PM UTC

Regarding the row height, do this: this.gridGroupingControl1.TableOptions.CaptionRowHeight = this.gridGroupingControl1.TableOptions.RecordRowHeight; Stefan

Dominic Morris
Replied On October 8, 2004 01:41 PM UTC

Thanks Stefan, trying that now... D. >Regarding the row height, do this: > > > this.gridGroupingControl1.TableOptions.CaptionRowHeight = this.gridGroupingControl1.TableOptions.RecordRowHeight; > > > >Stefan >

Dominic Morris
Replied On October 8, 2004 01:43 PM UTC

Perfect! Thanks Stefan. D. >Thanks Stefan, trying that now... >D. > >>Regarding the row height, do this: >> >> >> this.gridGroupingControl1.TableOptions.CaptionRowHeight = this.gridGroupingControl1.TableOptions.RecordRowHeight; >> >> >> >>Stefan >>

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.

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

;