bucz

I have added some tooltips to every cell in a data grid cell. Now, I want have an option to disable them. How to do that I havent seen any enable / disable option od tool tip in d.g.v.cell


Re: Windows Forms General Disabling tooltips in a DataGridViewCell

tracstarr

I'm not sure if there is a strict enable/disable option. One way would be to handle the cell formatting event and either set or delete ( use string.empty maybe) the actual value in the tooltip.

protected void c_grid_CellFormatting( object xoSender, DataGridViewCellFormattingEventArgs xoEvent )
{
if(xoEvent.Value != null )
{
DataGridViewCell oCell = ( (DataGridView)xoSender ).Rows[ xoEvent.RowIndex ].Cells[ xoEvent.ColumnIndex ];

oCell.ToolTipText = <something> or <string.empty>;

}

}