DataGridView Control Style

I have tried to change the background color of the column headers and they still remain the default control color. What can I do to change it.

Thanks

Ken



Answer this question

DataGridView Control Style

  • Paulo Sebastiao

    Ron,

    If you don't mind, can you provide a coding example.

    Thanks

    Ken


  • Phil333

    Hi,

    I have added my columns for my Datagrid view at design time using the columns property, and then using

    the columnHeaderDeafultstyle property to change its colour etc. By doing this the column Headers are always visible on the DatagridView control when run.

    when running the application.

    Ron


  • StephenMas

    Thankyou. This is exactly what I was looking for.

    Ken


  • Saranya

    I have tried this and the background color of the column headers remains the same.
  • JeremiahMetzen

    Hi,

    Have you changed the following property of the datagridview control:

    ColumnHeadersDefaultCellStyle

    Click on the eclipse button for this property and under appearance change the back colour to the desired colour. You will find that the preview rectangles at the bottom of this dialog will reflect your colour choice.

    Hope this helps

     

    Ron


  • Duppi

    hi,

    Please go through the below link which has similar problem and has been answered.
    Link: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=215783&SiteID=1

    Thank you,
    Bhanu.



  • DataGridView Control Style