title: Custom Draw cell thick border
body: <p>I have a grid with few columns with its borders custom drawn. But when we compare the borders of the custom drawn with the normal(non customised) columns it is like little thicker. So if we apply back color, will fill the whole cell like in Row number 2, Column 1. Is there any way to remove this thickness so that customised and non customised cells should look similar.</p>
  
  <blockquote>
    <p>Blockquote</p>
  </blockquote>
  
  <p><img src="https://i.stack.imgur.com/H54Dy.jpg" alt="enter image description here"></p>
  
  <p>The code is as follows:</p>
  
  <pre><code>private void uxGrid_CustomDrawCell(object sender, RowcellCustomDrawEventArgs e)
  {
  if(col==1)
  {
  DrawCellBorder(b,e.bounds);
  }
  }
  
  private void DrawCellBorder(RowCellCustomDrawEventArgs e, int top, int left, int right, int bottom)
  {
  
  Brush b = Brushes.Red;
  
  if(top ==1)
  e.Graphics.Fillrectangle(b, new Rectangle(e.Bounds.X, e.Bounds.Y, e.Bound.Width,1));
  
  
  if(right ==1)
  e.Graphics.Fillrectangle(b, new Rectangle(e.Bounds.X.Right, e.Bounds.Y, 1, e.Bound.Height));
  
  
  if(bottom ==1)
  e.Graphics.Fillrectangle(b, new Rectangle(e.Bounds.X, e.Bounds.Bottom, e.Bound.Width,1));
  
  
  if(left ==1)
  e.Graphics.Fillrectangle(b, new Rectangle(e.Bounds.X, e.Bounds.Y, 1, e.Bounds.Height));
  
  }
  </code></pre>