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.

How do I create a grid without any gridlines?

Thread ID:

Created:

Updated:

Platform:

Replies:

20101 Oct 10,2004 12:30 PM Oct 13,2004 09:43 AM Windows Forms 8
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On October 10, 2004 12:30 PM

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 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

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

Administrator [Syncfusion]
Replied On October 12, 2004 09:16 AM

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

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

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

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

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

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

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.

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.

;