Private Sub UltraGrid1_BeforeEnterEditMode( _
ByVal sender As System.Object, _
ByVal e As System.ComponentModel.CancelEventArgs) _
Handles UltraGrid1.BeforeEnterEditMode
If Me.UltraGrid1.ActiveCell Is Nothing Then Return
'Perform this action only on the "Bonus" column:
If Me.UltraGrid1.ActiveCell.Column.Key <> "Bonus" Then Return
'Extract the Employee object from the Current Row:
Dim theEmployee As Employee = _
DirectCast(Me.UltraGrid1.ActiveCell.Row.ListObject, Employee)
'Using custom business logic, determine if we should
'allow the "Bonus" column to allow editing:
If BusinessLogicManager.EmpDeservesBonus(theEmployee) = False Then
e.Cancel = True
End If
End Sub