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 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 12:55 PM

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 08:25 AM

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 09:16 AM

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


AD Administrator Syncfusion Team October 12, 2004 10:34 AM

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 10:49 AM

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 02:37 PM

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 06:49 AM

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 09:43 AM

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.
Live Chat Icon For mobile
Up arrow icon