How to set the different colors for the different datagridview rows in c#


i was take datagridview for windows forms application in that i was took a datagridview in that i want set a sifferent colors for datagridview rows

Hi to all,
i was take datagridview for windows forms application in that i was took a datagridview in that i want set a sifferent colors for datagridview rows i was not able to do this
please help me to do this out or which datagridview event i was try with many different datagridview event like cellleace,cellformattinfg etc.. so please tell me accurate event for that...
please help me...
Thanks and Regards,
Firoz


Reference: how to set the different colors for the different datagridview rows in c#


Comments

Author: nirav22 Apr 2010 Member Level: Gold   Points : 0

set the datagridview property AlternatingRowStyle-BackColor="colorname"

Author: chrisy04 May 2010 Member Level: Bronze   Points : 1

With Me.dataGridView1
.RowsDefaultCellStyle.BackColor = Color.Bisque
.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige
End With



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: