changing gridview style in code behind

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • suganya
    New Member
    • Dec 2006
    • 39

    changing gridview style in code behind

    Hi

    Can any body help me how can I change the header color of the gridview in code behind. I tried

    GridView1.Attri butes.Add("Head erStyle-BackColor", "blue");


    But its not working.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Just use the properties of the object?
    I recomend actually looking at the object in visual studio or on MSDN first.

    myGridView.Head erRow.BackColor =Color.Blue;

    Comment

    Working...