title: WinForms DataGridView Export to HTML with Cell Colors
body: <p>I have a datagridview and I change some of its rows according to some conditions (using CellFormatting event). That works fine. I need to implement a save as HTML (or PDF) functionality. I loop through its rows and columns and generate the HTML code, it works. But I also need to retain row coloring. </p>
  
  <p>I'm trying to access a specific cell's back color using the following code in the loop:</p>
  
  <pre><code>gridView.Rows[i].Cells[j].Style.BackColor
  </code></pre>
  
  <p>but it always returns 0.</p>
  
  <p>Any idea?</p>
  
  <p>Thanks</p>