title: DataGridView row: Semi-transparent selection or row border on selection
body: <p>I have a DataGridView where the background of each row is different depending on the data bound item. Though, when I select a row, I can no longer see its original background color.</p>
  
  <p>To solve this, I have thought of two solutions:</p>
  
  <p>I can make the selections semi-transparent, making it possible to see if two selected rows have different background colors.</p>
  
  <p>Or; I can remove the selection colors entirely, and draw a border around the selected rows.</p>
  
  <p>What option is easier and how can I do this?</p>
  
  <p>It's a WinForm app.</p>
  
  <p>Edit: I ended up using some of your code, adrift</p>
  
  <pre><code>    private void dgv_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
      {
          if (dgv.Rows[e.RowIndex].Selected)
          {
              var row = dgv.Rows[e.RowIndex];
              var bgColor = row.DefaultCellStyle.BackColor;
              row.DefaultCellStyle.SelectionBackColor = Color.FromArgb(bgColor.R * 5 / 6, bgColor.G * 5 / 6, bgColor.B * 5 / 6);
          }
      }
  </code></pre>
  
  <p>This gives the impression of a semi-transparent selection color. Thanks for your help!</p>