First Version

This commit is contained in:
Jonathan Jenne
2021-10-28 15:46:10 +02:00
parent 0b83ddcc4d
commit 0d9f84cc24
12 changed files with 708 additions and 8 deletions

View File

@@ -20,6 +20,7 @@ Public Class frmRowEditor
Private ReadOnly MultilineEditor As New RepositoryItemMemoEdit
Private ReadOnly AccountPicker As New RepositoryItemSearchLookUpEdit
Private ReadOnly MaskDateEditor As New RepositoryItemTextEdit
Private ReadOnly ReadOnlyEditor As New RepositoryItemTextEdit
Private Const COL_KEY = "KEY"
Private Const COL_VALUE_ORIGINAL = "VALUE_ORIGINAL"
@@ -45,6 +46,8 @@ Public Class frmRowEditor
AccountPicker.DisplayMember = "Name"
AccountPicker.ValueMember = "Id"
ReadOnlyEditor.ReadOnly = True
'DatePicker.CalendarTimeEditing = DevExpress.Utils.DefaultBoolean.False
'DatePicker.EditMask = "yyyy-MM-dd"
'DatePicker.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.DateTimeAdvancingCaret
@@ -181,6 +184,31 @@ Public Class frmRowEditor
e.RepositoryItem = AccountPicker
End If
End If
If e.Column.FieldName = COL_VALUE_FINAL Then
Dim oReadOnlyFields As New List(Of String) From {
"BELEGKEY"
}
If oReadOnlyFields.Contains(oDataRow.Item(COL_KEY)) Then
e.RepositoryItem = ReadOnlyEditor
End If
End If
End Sub
Private Sub GridView1_CustomDrawCell(sender As Object, e As DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs) Handles GridView1.CustomDrawCell
Dim oDataRow As DataRow = GridView1.GetDataRow(e.RowHandle)
If e.Column.FieldName = COL_VALUE_FINAL Then
Dim oReadOnlyFields As New List(Of String) From {
"BELEGKEY"
}
If oReadOnlyFields.Contains(oDataRow.Item(COL_KEY)) Then
e.Appearance.BackColor = Color.LightGray
End If
End If
End Sub
End Class