0
 DataGridViewImageColumn editCutomerCollumn = new DataGridViewImageColumn();
 editCutomerCollumn.Width = 32;
 editCutomerCollumn.HeaderText = "";
 editCutomerCollumn.ToolTipText = "Edit";
 editCutomerCollumn.Name = DataGridViewColumnNames.Customers.EDIT_BUTTON;
 editCutomerCollumn.Image = Properties.Resources.Edit20;
 _gridView.Columns.Add(editCutomerCollumn);

I want to use in Grid for the image Tooltip like

 editCutomerCollumn.ToolTipText = "Edit";

but problem is that tooltip is on cell header not on image. Why? Can I add tooltip on image on grid?

pravprab
  • 2,301
  • 3
  • 26
  • 43
senzacionale
  • 20,448
  • 67
  • 204
  • 316
  • 1
    possible duplicate of [winforms Tooltip in winforms DataGridViewImageColumn](http://stackoverflow.com/questions/1561119/winforms-tooltip-in-winforms-datagridviewimagecolumn) – Junaith Feb 05 '14 at 06:19

1 Answers1

1

The DataGridViewColumn.ToolTipText is meant for displaying tooltip on column headers.

The DataGridViewCell.ToolTipText is meant for displaying tooltip for each individual cells. But you have to be careful as it has performance penalities. If you are working with large amount of data and want to display tooltip then handle the DataGridView.CellToolTipTextNeeded event.

In my project we use to the column tooltip to hint what the column is meant for and cell tooltips, mainly in case of images to hint what does the image denotes.

Junaith
  • 3,298
  • 24
  • 34
  • exactly we would like to use toolTipps for images that you know what are you clicking. So for performance you suggest to use DataGridView.CellToolTipTextNeeded event? – senzacionale Feb 05 '14 at 07:06
  • @senzacionale - if you handling large amount of data and want to display tooltip then using the event would be much more performant as you can set tooltip when it is required. Otherwise you could simply set using the cell tootip property – Junaith Feb 05 '14 at 08:03