You can use tooltips to display additional information that doesn’t fit in grid cells. Use Grid.Tooltips property to control tooltip settings, colors, display time, etc. Tooltip contents for each cell are defined with Cell.TooltipMessage property. An example is provided below.
C# | Copy |
---|---|
public void ShowTooltip(Grid grid) { grid.Tooltips.TooltipEnabled = true; // enable tooltips grid.Rows[4][4].TooltipMessage = "My Custom Message"; // setting tooltip for a specific cell grid.Tooltips.TooltipDuration = TimeSpan.FromSeconds(3); // hiding tooltip after 3 seconds grid.Tooltips.IsBalloon = true; // balloon-like tooltip style grid.Tooltips.CellFrameColor = Color.Orange; // color of the cell’s frame } |
Back to .Net Grid HowTo topics