Here is an example of cell-painting this one Cell:

The CellPainting event does the work:
private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
if (e.ColumnIndex == 2 && e.RowIndex >= 0 && e.Value != null)
{
// use your own code here...
string val = ((int)e.Value).ToString("00000000");
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
e.PaintBackground(e.CellBounds, false);
for (int i = 0; i < count; i++)
using (SolidBrush brush = new // ..and here!!!
SolidBrush(colors[Convert.ToInt16(val[i].ToString())]))
e.Graphics.FillEllipse(brush,
e.CellBounds.X + i * 12 + 6, e.CellBounds.Y + 5 , 11, 11);
e.Handled = true;
}
}
It makes use of a predefined list of colors:
List<Color> colors = new List<Color>() // use your own set of colors here!
{ Color.Red, Color.Black, Color.Blue, Color.ForestGreen, Color.DarkKhaki,
Color.Goldenrod, Color.DeepPink, Color.Orange, Color.DarkSlateGray, Color.GreenYellow };
And a count of how many dots to draw:
int count = 7; // ditto!
Obviously you may want to change the way I stored the data for my test...
I have stored a large integer number as the cell's value and each digint is mapped onto one color.
you can (and probably should) change this!
Here is how I set up may DGV:
dataGridView1.Columns.Add("asd", "asd");
dataGridView1.Columns.Add("ko", "ok");
dataGridView1.Columns.Add("col", "col");
dataGridView1.Rows.Add(66);
for (int r = 0; r < 66; r++)
{
dataGridView1[0, r].Value = r;
dataGridView1[1, r].Value = r * 3.14f;
dataGridView1[2, r].Value = (int )( r * 314.345 + 1231542f);
}
Obviously none of it is how you will do it ;-)