Click here to Skip to main content
14,775,260 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
I want to change the gridlines color of one row of Datagridview at run time .

Is it possible.



Thanks

What I have tried:

DgvWatchList.Rows(DRC).DefaultCellStyle.grid = Color.Yellow
Posted
Updated 25-Dec-20 7:42am

1 solution

You have multiple level of control for it. Details are here: Change the Border and Gridline Styles in DataGridView Control - Windows Forms .NET Framework | Microsoft Docs[^]

Quote:
To change the border styles for DataGridView cells programmatically

- Set the CellBorderStyle, RowHeadersBorderStyle, and ColumnHeadersBorderStyle properties.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900