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

User (Old forums)
Member
Post count: 23064

All the code:

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

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
Next

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.

Thanks!

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