How do I create a grid without any gridlines?

I''d like to create a "plain" grid grouping control. By "plain" I mean no lines between the rows and columns and no border around the grid. Also, how do I change the background color of the column headers and not display a row header. This grid will not be editable. It will be used to for reporting purposes only. TIA

8 Replies

AD Administrator Syncfusion Team October 10, 2004 04:55 PM UTC

Try these settings. this.gridControl1.Properties.RowHeaders = false; this.gridControl1.DefaultGridBorderStyle = GridBorderStyle.None; GridStyleInfo style = this.gridControl1.BaseStylesMap["Column Header"].StyleInfo; style.BackColor =Color.Red; style.CellType = "Static"; this.gridControl1.TableStyle.CellType = "Static"; //all grid cells static


AD Administrator Syncfusion Team October 12, 2004 12:25 PM UTC

Hi Clay, I am using a gridgroupingcontrol and your sample code does not work for it. What are the equivalent properties to achieve the same effect for a gridgroupingcontrol? Thanks. >Try these settings. > >this.gridControl1.Properties.RowHeaders = false; >this.gridControl1.DefaultGridBorderStyle = GridBorderStyle.None; >GridStyleInfo style = this.gridControl1.BaseStylesMap["Column Header"].StyleInfo; >style.BackColor =Color.Red; >style.CellType = "Static"; >this.gridControl1.TableStyle.CellType = "Static"; //all grid cells static >


AD Administrator Syncfusion Team October 12, 2004 01:16 PM UTC

Try setting groupingControl.Appearance.AnyCell.Borders.All = GridBorder.Empty; groupingControl.TableModel.Options.DefaultGridBorderStyle = GridBorderStyle.None; Stefan


AD Administrator Syncfusion Team October 12, 2004 02:34 PM UTC

Thank you Stefan. That effectively removed the grid lines. Now how do I remove the row header (column 0 I think) so that no row/record marker is shown. Also, what property do I set to change the column header''s background color? TIA. >Try setting > >groupingControl.Appearance.AnyCell.Borders.All = GridBorder.Empty; >groupingControl.TableModel.Options.DefaultGridBorderStyle = GridBorderStyle.None; > > >Stefan > >


AD Administrator Syncfusion Team October 12, 2004 02:49 PM UTC

Ok, I figured out the Row header thing. Still need help with the Column header background color though. >Thank you Stefan. > >That effectively removed the grid lines. > >Now how do I remove the row header (column 0 I think) so that no row/record marker is shown. Also, what property do I set to change the column header''s background color? >


AD Administrator Syncfusion Team October 12, 2004 06:37 PM UTC

For the column header set groupingControl.Appearance.ColumnHeaderCell.Themed to false Then you can also set its BackColor. Stefan


AD Administrator Syncfusion Team October 13, 2004 10:49 AM UTC

I tried your suggestion to set the header cells'' background color but it does not work. Any other suggestions?


AD Administrator Syncfusion Team October 13, 2004 01:43 PM UTC

This code worked for me in the attached sample. this.gridGroupingControl1.Appearance.ColumnHeaderCell.Themed = false; this.gridGroupingControl1.Appearance.ColumnHeaderCell.BackColor = Color.Red; What are you doing differently? Can you post a sample that shows this problem? 13206_1530.zip

Loader.
Up arrow icon