Windows Develop Bookmark and Share   
 index > Windows Forms General > Hide/Remove Datagridview row/column headers
 

Hide/Remove Datagridview row/column headers

Hello,

I'd like to hide the datagridview row/column headers and if possible the horizontal and vertical seperators between cells I just want the datagridview cells to literally appear like this:

1stNamecell 1stschoolcell 1stdobcell

2ndNamecell 2ndschoolcell 2nddobcell

Thanks

perpetual_dream  Wednesday, July 18, 2007 11:26 AM
DataGridView.RowHeadersVisible and DataGridView.ColumnHeadersVisible
wjousts  Wednesday, July 18, 2007 11:55 AM
And to hide the seperators between cells which is the gridlines, just set their color to be the same as the default back color of the cell,

this.dataGridView1.GridColor = this.dataGridView1.DefaultCellStyle.BackColor;
Zhi-Xin Ye  Thursday, July 19, 2007 7:56 AM
DataGridView.RowHeadersVisible and DataGridView.ColumnHeadersVisible
wjousts  Wednesday, July 18, 2007 11:55 AM
And to hide the seperators between cells which is the gridlines, just set their color to be the same as the default back color of the cell,

this.dataGridView1.GridColor = this.dataGridView1.DefaultCellStyle.BackColor;
Zhi-Xin Ye  Thursday, July 19, 2007 7:56 AM
thnx Smile
perpetual_dream  Saturday, July 21, 2007 1:18 PM

You can use google to search for other answers

Custom Search

More Threads

• Object Data Source and Control DataBindings Order
• Changing Listview selected item forecolor
• Delete Item CheckedListBox
• Help: Multiple forms vs MDI Application in VS 2005 express
• copyFromScreen - no alpha window captured
• TreeView Owner Draw problem
• insert tab, goto line
• Events need to capture in main window
• datagridview
• Centering Toolstrip Buttons