Home Forums WinForms controls Xceed Grid for WinForms first-chance error Reply To: first-chance error

User (Old forums)
Post count: 23064

All the code:

Dim myColumnCash As New System.Data.DataColumn(“”, GetType(Double)) ‘<<DOUBLE!!

Grid1.SetDataBinding(myDS, myDtCashFlow.ToString)

Dim MaskCash As New GridNumericTextBox
Grid1.Columns(“Cash”).CellEditor = MaskCash

For Each cell As DataCell In Grid1.DataRowTemplate.Cells
AddHandler cell.LeavingEdit, AddressOf CellLeavingEdit
AddHandler cell.ValidationError, AddressOf CellValidationError

Sub CellLeavingEdit(ByVal sender As Object, ByVal e As LeavingEditEventArgs)
If e.NewValue <> “” And Not IsNumeric(e.NewValue) Then ‘<< if CTRL+V = “Hello!!”
messagebox.show ….
e.Cancel = True ‘<< !!!
End If
End Sub ‘<<<<<<<<<<<<< EXCEPTION FIRST-CHANCE !!! 🙁

The CellValidationError isn’t throw.


Imported from legacy forums. Posted by AndreaZ (had 2907 views)