Link to home
Create AccountLog in
Avatar of Victor  Charles
Victor CharlesFlag for United States of America

asked on

Help with changing backcolor of DataGridView

Hi,

How do you change the backcolor and text color of a particular column in a DatagridView using  VB.NET?

Thanks,

Victor
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

have you tried:
datagridview1.Columns(0).DefaultCellStyle.BackColor = Color.Aqua

Open in new window

Avatar of Victor  Charles

ASKER

Hi,

It works but I can't  find the correct syntax to also change  to column header's text and back color, what is the correct property to use.

Thanks,

V.
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thank You.