winforms Tooltip in winforms DataGridViewImageColumn

I have the following code that successfully displays an image in its column based on its bound DataProperty:

  private void dgvTasks_CellFormatting( object sender, DataGridViewCellFormattingEventArgs e ) {
        if (dgvTasks.Columns[e.ColumnIndex] is DataGridViewImageColumn && e.ColumnIndex == 1) {
            e.Value = ( (bool)e.Value == true ) ? Properties.Resources.ok : Properties.Resources.clock;

but I would like to know how its possible to show a tooltip when a user hovers over the image?

13.10.2009 15:47:48

generally if you have row & column for a cell, you can set a ToolTipText using:

dataGridView1.Rows[rowIndex].Cells[columnIndex].ToolTipText = "..."

and in your case, you have e.RowIndex and e.RowIndex:

dgvTasks.Rows[e.RowIndex].Cells[e.ColumnIndex].ToolTipText = "..."
13.10.2009 16:02:20
woa..that was quick U R A STAR!!! thank u much! dont know why i didnt think of that? anyway, now that I have that, I can work out the logic to determine the tooltiptext. Thanks again.
Shalan 13.10.2009 16:05:29