void radGridView1_CellPaint(object sender, Telerik.WinControls.UI.GridViewCellPaintEventArgs e)
{
GridDataCellElement dataCell = e.Cell as GridDataCellElement;
if (dataCell != null && dataCell.ColumnInfo.Name == "UnitPrice")
{
double value = Convert.ToDouble(dataCell.Value);
if (value == 0)
{
return;
}
Brush brush = value < 20 ? Brushes.Red : Brushes.Green;
Size cellSize = e.Cell.Size;
using (Font font = new Font("Segoe UI", 17))
{
e.Graphics.DrawString("*", font, brush, Point.Empty);
}
}
}