Change the Text Style of a DataGridView in C# – Programming, Pseudocode Example, C# Programming Example
C# Windows Form

Change the Text Style of a DataGridView in C#

In this example, we’ll learn, how to change the text style of a DataGridView in C#.

The following code will change the font of the text in the first row of the DataGridView to be bold and red. You can adjust the style and the row index to suit your needs.

You can also change the style for all cells in the DataGridView by setting the DefaultCellStyle property of the DataGridView itself, rather than just a specific row:

Example:

Output:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.