attempt to fix weird third row focus jump

This commit is contained in:
Jonathan Jenne 2022-08-19 11:48:43 +02:00
parent 2c40d014cd
commit fa22fba420

View File

@ -581,8 +581,9 @@ Public Class ClassControlCreator
Catch ex As Exception Catch ex As Exception
End Try End Try
End If End If
Dim oShouldDisplayFooter As Boolean = False Dim oShouldDisplayFooter As Boolean = False
For Each oCol As GridColumn In oView.Columns For Each oCol As GridColumn In oView.Columns
@ -701,7 +702,15 @@ Public Class ClassControlCreator
AddHandler oView.ValidateRow, AddressOf View_ValidateRow AddHandler oView.ValidateRow, AddressOf View_ValidateRow
AddHandler oControl.LostFocus, Sub(sender As GridControl, e As EventArgs) AddHandler oControl.LostFocus, Sub(sender As GridControl, e As EventArgs)
Dim oView2 As GridView = sender.FocusedView Dim oView2 As GridView = sender.FocusedView
oView2.UpdateCurrentRow()
' 19.08.2022:
' Calling UpdateCurrentRow when newRowModified Is true
' leads to some weird jumping of focus in the current cell.
' This seems to fix it.
If newRowModified = False Then
oView2.UpdateCurrentRow()
End If
End Sub End Sub
' 08.11.2021: Fix editor being empty on first open ' 08.11.2021: Fix editor being empty on first open
@ -1039,7 +1048,7 @@ Public Class ClassControlCreator
Logger.Error(ex) Logger.Error(ex)
End Try End Try
If oIsRequired And pValue.ToString = "" Then If oIsRequired And (pValue IsNot Nothing AndAlso pValue.ToString = "") Then
pErrorText = "Spalte muss ausgefüllt werden!" pErrorText = "Spalte muss ausgefüllt werden!"
pIsValid = False pIsValid = False
Return False Return False