Reputation: 2073
Quick question, Is there any way to remove the lines between columns in a datagrid? I've only seen one answer on SO and it was in regards to WPF, and was not relevant to winforms.
I'm starting to think it may be something super simple, or perhaps the opposite and i'll have to override the draw functions (Which is more effort than it's worth and i'll probably leave it).
Cheers in advance
Upvotes: 2
Views: 6030
Reputation: 14581
The simplest way is to change the border style (also see other *Horizontal styles) by modifying the CellBorderStyle
property in property inspector or in the code:
dataGridView1.CellBorderStyle = DataGridViewCellBorderStyle.SingleHorizontal;
It always helps to look up the control documentation in MSDN :)
Upvotes: 7