title: Custom ComboBox Column for DataGridView
body: <p>We have a Custom ComboBox working on a form that displays some shapes instead of text. To do that all I had to do was to override the OnDrawItem function and it displays what we want. Here is a snippet for reference:</p>
  
  <pre><code>protected override void OnDrawItem(DrawItemEventArgs e)
  {
      base.OnDrawItem(e);
  
      e.DrawBackground();
      if (e.Index &gt;= 0)
      {
          Brush brush = new SolidBrush(Color.LightGray);
  
          int size = this.Height/2;
          int origenX = e.Bounds.X + 1;
          int origenY = e.Bounds.Y + 3;
          System.Drawing.Drawing2D.GraphicsPath path =
                  new System.Drawing.Drawing2D.GraphicsPath();
          switch (e.Index)
          {
              case 0:                            
                  e.Graphics.FillRectangle(brush, origenX, origenY, size, size);                            
                  Rectangle r = new Rectangle(origenX, origenY, size, size);                            
                  ControlPaint.DrawBorder(e.Graphics, r, Color.Black,
                                          ButtonBorderStyle.Solid);
                  break;
              case 1:
                  path.AddEllipse(origenX, origenY, size, size);
                  e.Graphics.FillPath(brush, path);
                  e.Graphics.DrawPath(Pens.Black, path);
                  break;
          }
      }
  }
  </code></pre>
  
  <p>So, if you add that to a form and add a couple of items to your collection all you see is a square and a circle in the drop down. </p>
  
  <p>Ok, so, what I want to do now is add this same combo box to a DataGridView. I know that this control has a DataGridViewComboBoxColumn. I was trying to extend the control, however, I don't see this OnDrawItem function to override. I guess there exists something similar?
  Any help would be appreciated.
  Thanks! </p>