Hello,
in my DataGridView I have a column for E-Mail adresses. The user clicks on the E-Mail adress and my programm opens a new E-Mail.
When the mouse is over the E-Mail adress I have this CellMouseMove Event to change the Cursor (to Cursor.Hand):
But when there is no E-Mail adress the cursor should not change to "Cursor.Hand". Any suggestion how to solve this?
in my DataGridView I have a column for E-Mail adresses. The user clicks on the E-Mail adress and my programm opens a new E-Mail.
When the mouse is over the E-Mail adress I have this CellMouseMove Event to change the Cursor (to Cursor.Hand):
private void dg_CustomerContact_CellMouseMove(object sender, MouseEventArgs e) { GridDataCellElement cell = this.dg_CustomerContact.RootElement.ElementTree.GetElementAtPoint(e.Location) as GridDataCellElement; if (cell != null && ((GridViewDataColumn)cell.ColumnInfo).Name == "dg_TalkedWith_col_Email") { originalCursor = this.dg_CustomerContact.Cursor; this.dg_CustomerContact.Cursor = Cursors.Hand; } else { if (originalCursor != null) { this.dg_CustomerContact.Cursor = originalCursor; originalCursor = Cursors.Default; } } }But when there is no E-Mail adress the cursor should not change to "Cursor.Hand". Any suggestion how to solve this?