How to hide the grid lines of a DataGridView? Winforms C#
How to hide the grid lines of a DataGridView?
I have searched the internet but found no solu开发者_运维知识库tions on this. Please help, thanks.
You can try
MyGrid.CellBorderStyle = DataGridViewCellBorderStyle.None;
dataGridView1.CellBorderStyle = DataGridViewCellBorderStyle.None;
You Can Also Set this in DataGridView Properties,
Select DataGridView --> Properties --> CellBorderStyle change this to None.
you can also try this one
this.dataGridView1.AdvancedCellBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None;
TableView view = new TableView();
view.HorizontalGridLineThickness = 1;
view.VerticalGridLineThickness = 1;
view.HorizontalGridLineBrush = Brushes.Orange;
view.VerticalGridLineBrush = Brushes.Orange;
dataGridControl.View = view;
try this code.....its very useful #Gawtam
精彩评论