开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜