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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How do I create a grid without any gridlines?

Thread ID:

Created:

Updated:

Platform:

Replies:

20101 Oct 10,2004 04:30 PM UTC Oct 13,2004 01:43 PM UTC WinForms 8
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On October 10, 2004 04:30 PM UTC

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

Administrator [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On 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 >

Administrator [Syncfusion]
Replied On October 12, 2004 01:16 PM UTC

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

Administrator [Syncfusion]
Replied On 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 > >

Administrator [Syncfusion]
Replied On 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? >

Administrator [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On 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?

Administrator [Syncfusion]
Replied On 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

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

;