title: How to get the Style.BackColor of a datagridview cell
body: <p>Using VS2010 VB.NET, I have a datagridview (dgv) where I set the background color of cells according to a certain value. This particular cell does not store any information and therefore I can not use the data in that cell to determine the background color.</p>
  
  <p>My current attempts are a complete failure and MSDN is only particular to "setting" and not "getting" the background color of a cell.</p>
  
  <p>Code I've tried"</p>
  
  <pre><code>if dgvNotes.Rows(clickedCell.RowIndex).Cells(1).Style.BackColor.ToString = "Red" then
  
  if dgvNotes.Rows(clickedCell.RowIndex).Cells(1).Style.BackColor = Color.Red then
  </code></pre>
  
  <p>I am not able to find much information on the topic as most of the posts on various coding sites focusses on "setting" the background color.</p>
  
  <p>Is there any way that I can determine cell background color after the dgv was populated ?
  Thanks</p>