Compare commits
4 Commits
37cc6c9305
...
858ac7d312
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
858ac7d312 | ||
|
|
ec8c0c7cd9 | ||
|
|
581b8d4f1f | ||
|
|
df261a36ac |
@@ -49,6 +49,7 @@ Public Class RepositoryItemLookupControl3
|
||||
SetDropdownButtonEnabled(_MultiSelect)
|
||||
End Sub
|
||||
|
||||
Private Const NAME_DATATABLE_INTERNAL = "__INTERNAL_DATATABLE__"
|
||||
Private Const TAG_DROPDOWN = "openDropdown"
|
||||
Private Const TAG_BUTTON_LOOKUP_FORM = "openLookupForm"
|
||||
|
||||
@@ -165,8 +166,12 @@ Public Class RepositoryItemLookupControl3
|
||||
NullText = Values.FirstOrDefault()
|
||||
End If
|
||||
|
||||
If DataSource Is Nothing Then
|
||||
Dim oDataTable As New DataTable()
|
||||
' If No external Datasource is supplied, create one containing the currently selected values
|
||||
' If the current datasource is the internal one, update it
|
||||
If DataSource Is Nothing OrElse (TypeOf DataSource Is DataTable AndAlso DirectCast(DataSource, DataTable).TableName = NAME_DATATABLE_INTERNAL) Then
|
||||
Dim oDataTable As New DataTable() With {
|
||||
.TableName = NAME_DATATABLE_INTERNAL
|
||||
}
|
||||
oDataTable.Columns.Add(New DataColumn("Data", GetType(String)))
|
||||
|
||||
For Each oValue In Values
|
||||
@@ -248,9 +253,9 @@ Public Class RepositoryItemLookupControl3
|
||||
If DataSource IsNot Nothing AndAlso DataSource.Columns.Count > 0 Then
|
||||
Dim oFirstColumn As String = DataSource.Columns.Item(0).ColumnName
|
||||
|
||||
Dim oWrapped = SelectedValues.Select(Function(v As String)
|
||||
Return $"'{v}'"
|
||||
End Function).ToArray()
|
||||
Dim oWrapped = SelectedValues.
|
||||
Select(Function(v As String) $"'{v}'").
|
||||
ToArray()
|
||||
Dim oValueString As String = String.Join(",", oWrapped)
|
||||
Dim oCriterium As String = $"[{oFirstColumn}] IN ({oValueString})"
|
||||
View.ActiveFilterCriteria = DevExpress.Data.Filtering.CriteriaOperator.Parse(oCriterium)
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("3.0.1.0")>
|
||||
<Assembly: AssemblyFileVersion("3.0.1.0")>
|
||||
<Assembly: AssemblyVersion("3.0.2.0")>
|
||||
<Assembly: AssemblyFileVersion("3.0.2.0")>
|
||||
|
||||
@@ -187,6 +187,10 @@ Public Class ControlCreator
|
||||
oControl.Properties.PreventDuplicates = pPreventDuplicateValues
|
||||
oControl.Properties.AppearanceFocused.BackColor = HightlightColor
|
||||
|
||||
' Add Handler before assigning Default Value so
|
||||
' OnControlChanged will fire for default values as well
|
||||
AddHandler oControl.Properties.SelectedValuesChanged, Sub() OnControlChanged.Invoke(oControl)
|
||||
|
||||
If Not String.IsNullOrEmpty(pDefaultValue) Then
|
||||
Dim oDefaultValues As New List(Of String)
|
||||
|
||||
@@ -204,8 +208,6 @@ Public Class ControlCreator
|
||||
oControl.Properties.SelectedValues = oDefaultValues
|
||||
End If
|
||||
|
||||
AddHandler oControl.Properties.SelectedValuesChanged, Sub() OnControlChanged.Invoke(oControl)
|
||||
|
||||
If OnLookupData Is Nothing Then
|
||||
Logger.Warn("LookupGrid Datasource could not be set, OnLookupData Function is not defined!")
|
||||
End If
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' indem Sie "*" wie unten gezeigt eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyVersion("1.0.1.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.1.0")>
|
||||
|
||||
Reference in New Issue
Block a user