Compare commits
2 Commits
Release-Sp
...
Release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8704691d4c | ||
|
|
2a781f0be7 |
@@ -804,7 +804,6 @@ Public Class ClassControlCreator
|
|||||||
|
|
||||||
Public Function GridTables_GetRepositoryItemForColumn(pColumnName As String, pDataTable As DataTable, pIsAdvancedLookup As Boolean) As RepositoryItem
|
Public Function GridTables_GetRepositoryItemForColumn(pColumnName As String, pDataTable As DataTable, pIsAdvancedLookup As Boolean) As RepositoryItem
|
||||||
If pIsAdvancedLookup Then
|
If pIsAdvancedLookup Then
|
||||||
|
|
||||||
Dim oEditor = New RepositoryItemLookupControl3
|
Dim oEditor = New RepositoryItemLookupControl3
|
||||||
|
|
||||||
If pDataTable IsNot Nothing Then
|
If pDataTable IsNot Nothing Then
|
||||||
@@ -813,18 +812,34 @@ Public Class ClassControlCreator
|
|||||||
oEditor.DataSource = pDataTable
|
oEditor.DataSource = pDataTable
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' Erlaube ungültige Werte (verhindert automatisches Löschen)
|
||||||
|
oEditor.NullText = "[Ungültiger Wert]"
|
||||||
|
oEditor.ShowFooter = False
|
||||||
|
oEditor.AllowNullInput = DefaultBoolean.True
|
||||||
|
oEditor.ValidateOnEnterKey = True
|
||||||
|
|
||||||
|
' KRITISCH: Erlaube Texteingabe für ungültige Werte
|
||||||
|
oEditor.TextEditStyle = TextEditStyles.Standard
|
||||||
|
|
||||||
|
' Weitere Standard-Eigenschaften für LookupControl3
|
||||||
|
'oEditor.ImmediatePopup = False
|
||||||
|
|
||||||
Return oEditor
|
Return oEditor
|
||||||
Else
|
Else
|
||||||
Dim oEditor = New RepositoryItemComboBox()
|
Dim oEditor = New RepositoryItemComboBox()
|
||||||
Dim oItems As New List(Of String)
|
Dim oItems As New List(Of String)
|
||||||
|
|
||||||
AddHandler oEditor.Validating, Sub(_sender As ComboBoxEdit, _e As CancelEventArgs)
|
' KRITISCH: Erlaube Anzeige ungültiger Werte
|
||||||
If oItems.Contains(_sender.EditValue) Then
|
oEditor.TextEditStyle = TextEditStyles.Standard ' Statt DisableTextEditor!
|
||||||
_e.Cancel = False
|
oEditor.AllowNullInput = DefaultBoolean.True
|
||||||
Else
|
oEditor.ValidateOnEnterKey = True
|
||||||
_e.Cancel = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
AddHandler oEditor.Validating, Sub(_sender As ComboBoxEdit, _e As CancelEventArgs)
|
||||||
|
' Prüfe nur bei Änderung, nicht beim Anzeigen
|
||||||
|
If Not oItems.Contains(_sender.EditValue) AndAlso _sender.IsModified Then
|
||||||
|
_e.Cancel = True
|
||||||
|
_sender.ErrorText = "Ungültiger Wert - bitte neu auswählen"
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
If pDataTable IsNot Nothing Then
|
If pDataTable IsNot Nothing Then
|
||||||
@@ -846,7 +861,6 @@ Public Class ClassControlCreator
|
|||||||
Return oEditor
|
Return oEditor
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Sub GridTables_HandleControlValueChange(pControlPanel As XtraScrollableControl, pColumnsWithSqlAndControlPlaceholders As DataTable)
|
Public Sub GridTables_HandleControlValueChange(pControlPanel As XtraScrollableControl, pColumnsWithSqlAndControlPlaceholders As DataTable)
|
||||||
If Not IsNothing(pColumnsWithSqlAndControlPlaceholders) AndAlso pColumnsWithSqlAndControlPlaceholders.Rows.Count > 0 Then
|
If Not IsNothing(pColumnsWithSqlAndControlPlaceholders) AndAlso pColumnsWithSqlAndControlPlaceholders.Rows.Count > 0 Then
|
||||||
For Each oRow As DataRow In pColumnsWithSqlAndControlPlaceholders.Rows
|
For Each oRow As DataRow In pColumnsWithSqlAndControlPlaceholders.Rows
|
||||||
|
|||||||
@@ -462,23 +462,43 @@ Namespace ControlCreator
|
|||||||
isApplyingInheritedValue = True
|
isApplyingInheritedValue = True
|
||||||
Try
|
Try
|
||||||
_Logger.Info(String.Format("Inherit Value is active for column. So inheritting the value [{0}]...", valueToApply))
|
_Logger.Info(String.Format("Inherit Value is active for column. So inheritting the value [{0}]...", valueToApply))
|
||||||
For dataIndex As Integer = listIndex + 1 To pView.DataRowCount - 1
|
|
||||||
Dim targetHandle = pView.GetRowHandle(dataIndex)
|
|
||||||
If targetHandle = DevExpress.XtraGrid.GridControl.InvalidRowHandle OrElse pView.IsGroupRow(targetHandle) Then
|
|
||||||
Continue For
|
|
||||||
End If
|
|
||||||
|
|
||||||
If pView.IsNewItemRow(targetHandle) Then
|
' Batch-Update mit BeginUpdate/EndUpdate für bessere Performance
|
||||||
Exit For
|
pView.BeginUpdate()
|
||||||
End If
|
Try
|
||||||
|
For dataIndex As Integer = listIndex + 1 To pView.DataRowCount - 1
|
||||||
|
Dim targetHandle = pView.GetRowHandle(dataIndex)
|
||||||
|
If targetHandle = DevExpress.XtraGrid.GridControl.InvalidRowHandle OrElse pView.IsGroupRow(targetHandle) Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
Dim existingValue = pView.GetRowCellValue(targetHandle, pArgs.Column.FieldName)
|
If pView.IsNewItemRow(targetHandle) Then
|
||||||
If Equals(existingValue, valueToApply) Then
|
Exit For
|
||||||
Continue For
|
End If
|
||||||
End If
|
|
||||||
|
Dim existingValue = pView.GetRowCellValue(targetHandle, pArgs.Column.FieldName)
|
||||||
|
If Equals(existingValue, valueToApply) Then
|
||||||
|
Continue For
|
||||||
|
End If
|
||||||
|
|
||||||
|
pView.SetRowCellValue(targetHandle, pArgs.Column.FieldName, valueToApply)
|
||||||
|
Next
|
||||||
|
|
||||||
|
' WICHTIG: Nach dem Setzen der Werte die Spalte neu zeichnen
|
||||||
|
pView.LayoutChanged()
|
||||||
|
|
||||||
|
' Nur die betroffene Spalte invalidieren (effizienter als alle Zeilen)
|
||||||
|
For dataIndex As Integer = listIndex + 1 To pView.DataRowCount - 1
|
||||||
|
Dim targetHandle = pView.GetRowHandle(dataIndex)
|
||||||
|
If targetHandle <> DevExpress.XtraGrid.GridControl.InvalidRowHandle AndAlso Not pView.IsNewItemRow(targetHandle) Then
|
||||||
|
pView.InvalidateRowCell(targetHandle, pArgs.Column)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
Finally
|
||||||
|
pView.EndUpdate()
|
||||||
|
End Try
|
||||||
|
|
||||||
pView.SetRowCellValue(targetHandle, pArgs.Column.FieldName, valueToApply)
|
|
||||||
Next
|
|
||||||
Finally
|
Finally
|
||||||
isApplyingInheritedValue = False
|
isApplyingInheritedValue = False
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.7.9.0")>
|
<Assembly: AssemblyVersion("2.8.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
<Assembly: NeutralResourcesLanguage("")>
|
<Assembly: NeutralResourcesLanguage("")>
|
||||||
|
|||||||
@@ -125,7 +125,7 @@
|
|||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw
|
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADw
|
||||||
CAAAAk1TRnQBSQFMAgEBAgEAAbABCwGwAQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
CAAAAk1TRnQBSQFMAgEBAgEAAbgBCwG4AQsBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
|
||||||
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
|
||||||
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
|
||||||
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
|
||||||
|
|||||||
Reference in New Issue
Block a user