Skip to content
Loading
how to chang datagrideview row color
  • Suraj Kumar
    You can do this
     
    1. foreach (DataGridViewRow row in dataGridView1.Rows)   
    2.     if (Convert.ToInt32(row.Cells[2].Value)==0 )   
    3.     {  
    4.         row.DefaultCellStyle.BackColor = Color.Red;   
    5.     }