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

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

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.

8 Replies

DM Dominic Morris 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.


AD Administrator Syncfusion Team 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


DM Dominic Morris 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


DM Dominic Morris 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 > >


AD Administrator Syncfusion Team 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


AD Administrator Syncfusion Team October 8, 2004 01:38 PM UTC

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


DM Dominic Morris 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 >


DM Dominic Morris 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 >>

Loader.
Up arrow icon