This commit is contained in:
2022-07-28 16:08:48 +02:00
parent 28254c99f7
commit 3795c8fd74
12 changed files with 371 additions and 337 deletions

View File

@@ -186,9 +186,9 @@ Public Class ClassWindreamDocGrid
Dim type As Integer = row.Item("TYPE_ID")
If type = 4 And isConfig = False Then
If type = 3 And isConfig = False Then
DATE_COLUMNS.Add(columnTitle)
ElseIf type = 4 And isConfig = True Then
ElseIf type = 3 And isConfig = True Then
DATE_COLUMNS_CONFIG.Add(columnTitle)
End If
@@ -311,7 +311,7 @@ Public Class ClassWindreamDocGrid
Dim type As Integer = row.Item("TYPE_ID")
Dim isConfig As Boolean = row.Item("CONFIG_COLUMNS")
If Not IsNothing(col) And type = 4 And isConfig Then
If Not IsNothing(col) And type = 3 And isConfig Then
LOGGER.Debug($"Adapting DisplayFormat (DATETIME for Column {colCaption}")
col.DisplayFormat.FormatType = FormatType.DateTime
col.DisplayFormat.FormatString = CURRENT_DATE_FORMAT & " HH:MM:ss"
@@ -373,9 +373,7 @@ Public Class ClassWindreamDocGrid
AddHandler textedit.Leave, _textValueChangedHandler
e.RepositoryItem = textedit
End If
If typeId = 2 Then
ElseIf typeId = 2 Then
Dim checkEdit As New RepositoryItemCheckEdit()
checkEdit.ValueChecked = "True"
checkEdit.ValueUnchecked = "False"
@@ -385,9 +383,7 @@ Public Class ClassWindreamDocGrid
AddHandler checkEdit.CheckedChanged, _checkValueChangedHandler
e.RepositoryItem = checkEdit
End If
If typeId = 3 Then
ElseIf typeId = 3 Then
Dim dateedit As New RepositoryItemDateEdit()
dateedit.DisplayFormat.FormatType = FormatType.DateTime
@@ -415,22 +411,28 @@ Public Class ClassWindreamDocGrid
AddHandler dateedit.EditValueChanged, _datepickerValueChangedHandler
e.RepositoryItem = dateedit
End If
'ElseIf typeId = 4 And editable = F Then
' Dim dropdown As New RepositoryItemComboBox()
' Dim matchingRows() As DataRow = DT_DROPDOWN_ITEMS.Select(String.Format("CONFIG_ID = {0}", configId), "SEQUENCE")
If typeId = 4 Then
Dim dropdown As New RepositoryItemComboBox()
Dim matchingRows() As DataRow = DT_DROPDOWN_ITEMS.Select(String.Format("CONFIG_ID = {0}", configId), "SEQUENCE")
' For Each matchingRow As DataRow In matchingRows
' Dim item As New WindreamDocGridComboboxItem()
' item.ConfigID = matchingRow.Item("CONFIG_ID")
' item.Value = matchingRow.Item("VALUE")
' dropdown.Items.Add(item)
' Next
For Each matchingRow As DataRow In matchingRows
Dim item As New WindreamDocGridComboboxItem()
item.ConfigID = matchingRow.Item("CONFIG_ID")
item.Value = matchingRow.Item("VALUE")
dropdown.Items.Add(item)
Next
' AddHandler dropdown.SelectedValueChanged, _dropdownValueChangedHandler
AddHandler dropdown.SelectedValueChanged, _dropdownValueChangedHandler
' e.RepositoryItem = dropdown
e.RepositoryItem = dropdown
'End If
ElseIf typeId = 4 And editable Then
Dim textedit As New RepositoryItemTextEdit()
AddHandler textedit.Leave, _textValueChangedHandler
e.RepositoryItem = textedit
End If
ElseIf (e.Column.Name <> "colVALUE") Then