This feature has been added initially on grid design stage. You can use it by calling Cell.Highlight() method as shown in the example below.

C# Copy imageCopy
public void HowToHighlightCell(Grid grid)
{
    grid.Headers.Add(new Header());
    grid.Headers[0].Add(new Column("Price"));
    grid.Headers[0].Add(new Column("Quantity"));

    grid.Rows.Add(new Product());
    Row row = grid.Rows[0];

    //Set a new price programmatically
    Cell cell = row["Price"];

    //Highlight the cell with the red color for 2 seconds
    cell.Highlight(new TimeSpan(0, 0, 2), Color.Red);

}

Back to .Net Grid HowTo topics