When the cell contents are too long, the following is ignored
Solution: Add DGV when mouse moves to a cell event, setthe contents of the current cell's ToolTipText property areCurrent cell contents
voidFrom_load (Objectsender, EventArgs e) { This. dgvsystemlog.showcelltooltips =true; This. Dgvsystemlog.cellmouseenter + =NewDatagridviewcelleventhandler (dgvsystemlog_cellmouseenter);}/// <summary>///set the current cell's ToolTipText property content to the current cell when you move the mouse over the cell///solve the problem of tip content not displaying completely/// </summary>/// <param name= "Sender" ></param>/// <param name= "E" ></param>voidDgvsystemlog_cellmouseenter (Objectsender, DataGridViewCellEventArgs e) { if(E.columnindex <0|| E.rowindex <0|| DgvSystemLog.Rows.Count <=0)return; Dgvsystemlog.rows[e.rowindex]. Cells[e.columnindex]. ToolTipText= (Dgvsystemlog.rows[e.rowindex]. Cells[e.columnindex]. Value??string. Empty). ToString ();}
the effect after the change:
Reference: Http://stackoverflow.com/questions/22626802/how-to-increase-the-length-of-tooltip-in-datagridview-in-winforms
From for notes (Wiz)
C # DataGridView Displays the full cell contents in the cell hint (tooltip)