Results 1 to 3 of 3

Thread: [RESOLVED] DataGridView HeaderCell Color changing

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    Köln
    Posts
    395

    Resolved [RESOLVED] DataGridView HeaderCell Color changing

    Hi i have a few datagridviews in my application

    how can I change the color of the top row (Header).

    This is what i thought the right command but unsucessfull

    dGrid1.Columns[i].HeaderCell.Style.BackColor = Color.LightSteelBlue;

    Anyone has a solution for this.

    many thx in advance

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: DataGridView HeaderCell Color changing

    You cannot change the column and row header colours without disabling visual styles:
    Code:
    myDataGridView.EnableHeadersVisualStyles = false;
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    Köln
    Posts
    395

    Re: DataGridView HeaderCell Color changing

    @jmcilhinney:

    many thx - works like expected

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width