Skip to content

Replies

0
Bruno
Bruno answered on Aug 29, 2018 11:16 AM

Hi Mike,

Thank you very much, this is indeed working [emoticon:6d505171faa4497c85c5ca27290c555d]
For anyone interested, here is the implementation :

Public Sub New()
	myUltraGrid.DisplayLayout.Override.NullText = "NULL"
End Sub

Private Sub myUltraGrid_AfterExitEditMode(sender As Object, aArgs As EventArgs) Handles myUltraGrid.AfterExitEditMode
	'get new value of the cell
	Dim newCellValue As Object = myUltraGrid.ActiveCell.Value
	
	'set DBNULL if value is "NULL"
	If newCellValue.GetType() = GetType(String) then
		Dim strCellValue as string = CStr(newCellValue)
		If strCellValue = "NULL" then
			myUltraGrid.ActiveCell.Value = DBNull.Value
		End If
	End If
End Sub