The OnDraw routine in the derived cellrenderer just draws the bitmap to fit the cell. If you want to center it, then you will have to modifiy the code to center it. Here is a try at it.
protected override void OnDraw(Graphics g, Rectangle clientRectangle, int rowIndex, int colIndex, GridStyleInfo style)
{
if (clientRectangle.IsEmpty)
return;
// CellLayout layout = GetCellLayout(int rowIndex, int colIndex, GridStyleInfo style)
if(style.Tag is Bitmap)
{
int cellWidth = clientRectangle.Width;
int cellHeight = clientRectangle.Height;
int bmpWidth = ((Bitmap) style.Tag).Width;
int bmpHeight = ((Bitmap) style.Tag).Height;
int left = clientRectangle.X + (cellWidth - bmpWidth) / 2;
int top = clientRectangle.Y + (cellHeight - bmpHeight) / 2;
g.DrawImage((Bitmap) style.Tag, left, top, bmpWidth, bmpHeight);
}
}