hi Neevarp:
you can use cellpaint event in datagridview and follow code works well in my pc
#123 can be red and aaa still black
void button2_Click(object sender, EventArgs e)
{
this.dataGridView2.Columns.Add(new DataGridViewTextBoxColumn());
this.dataGridView2[0, 0].Value = "aaa#123";
}
private void dataGridView2_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
{
if (e.RowIndex == 0 && e.ColumnIndex == 0)
{
int index = e.Value.ToString().IndexOf("#");
string black = e.Value.ToString().Substring(0, index);
string red = e.Value.ToString().Substring(index);
e.Paint(e.CellBounds, DataGridViewPaintParts.All & ~DataGridViewPaintParts.ContentForeground);
Font font = this.dataGridView1.Font;
Rectangle strRect = e.CellBounds;
strRect.Width = TextRenderer.MeasureText(black, font).Width;
e.Graphics.DrawString(black, font, Brushes.Black, strRect);
strRect.X = strRect.X+strRect.Width;
strRect.Width =TextRenderer.MeasureText(red, font).Width;
e.Graphics.DrawString(red, font, Brushes.Red, strRect);
e.Handled = true;
}
}