Igor/10Tec
2014-11-26T15:05:20Z
Below you'll find a code snippet that demonstrates how to check whether the cell image is clicked. This code works for the default left-top image alignment inside cell, but it can be easily modified for other image alignment options.

Private Sub iGrid1_CellMouseDown(sender As Object, e As TenTec.Windows.iGridLib.iGCellMouseDownEventArgs) Handles iGrid1.CellMouseDown
	' Get the clicked cell object to access its ContentIndent and Bounds properties
	Dim myCell As iGCell = iGrid1.Cells(e.RowIndex, e.ColIndex)

	' Get the effective cell padding
	Dim myContentIndent As iGIndent
	If myCell.ContentIndent.Equals(iGIndent.NotSet) Then
		myContentIndent = iGrid1.Cols(e.ColIndex).CellStyle.ContentIndent
	Else
		myContentIndent = myCell.ContentIndent
	End If

	' Calculate the image rect (the LeftTop alignment for the cell image)
	Dim myCellIconRect As New Rectangle( _
		myCell.Bounds.Left + myContentIndent.Left, _
		myCell.Bounds.Top + myContentIndent.Top, _
		ImageList1.ImageSize.Width, _
		ImageList1.ImageSize.Height _
		)

	' If the mouse pointer inside the cell image rect, we have image click
	If myCellIconRect.Contains(e.MousePos) Then
		' Execute your special image click action here
		MsgBox("Cell image clicked.")
		' Use the following line to prevent cell from being edited when the cell image is clicked
		e.DoDefault = False
	End If
End Sub

Attached is the sample project (VS2010-2013 | VB.NET | iGrid.NET 4.6)
File Attachment(s):
CellImageClick.zip (16kb) downloaded 140 time(s).
Igor/10Tec
2015-09-22T07:06:31Z
An update: iGrid.NET 5.0 introduced the iGCell.IamgeBounds property that returns the rectangle occupied by the cell image, and you can use this property to test whether the cell image has been clicked. This is also the universal solution, as the code placed above works only for the default top-left alignment of the image in the cell.