Highlights the Cell for the specified amount of time with specified background and foreground colors.

Namespace: Dapfor.Net.Ui
Assembly: Dapfor.Net (in Dapfor.Net.dll) Version: (


public void Highlight(
	TimeSpan interval,
	Color backColor,
	Color foreColor
Visual Basic
Public Sub Highlight ( 
	interval As TimeSpan,
	backColor As Color,
	foreColor As Color
Visual C++
void Highlight(
	TimeSpan interval, 
	Color backColor, 
	Color foreColor
member Highlight : 
        interval : TimeSpan * 
        backColor : Color * 
        foreColor : Color -> unit 


Type: System..::..TimeSpan
The time interval, when the Cell is highlighted.
Type: System.Drawing..::..Color
The background color.
Type: System.Drawing..::..Color
The foreground color.


.Net Grid provides an extremely convenient mechanism of data highlighting. Highlighting is the process of changing background color of a cell for a specified time interval and gradual restoration of the initial color afterwards. Background color of a cell can be changed twice (at the beginning and at the end) or with a little periodicity (about 30 ms)enabling fading effect with gradual transition between the highlight color and the original background color of the cell.

In programming cell highlighting can be achieved by calling Highlight(TimeSpan, Color). When a programmer calls this method, the grid adds specific information about cell's state into an internal container and launches timers when necessary. The second parameter is the color that may contain alpha-channel enabling mixing of the highlight color and the background color (transparency effect). It's important to mention that the .Net Grid has a very easy to use API that saves programmer's time. Highlighting management and initial parameters are accessible via Highlighting property.

 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 red background and green foreground colors for 2 seconds
    cell.Highlight(new TimeSpan(0, 0, 2), Color.Red, Color.Green);


Thread Safety

The method is not thread safe.

See Also