LookupGrid: Update NullText for initial state
This commit is contained in:
parent
deec4e8bac
commit
e0612bc0d3
@ -48,6 +48,7 @@ Public Class RepositoryItemLookupControl3
|
|||||||
Public Sub New()
|
Public Sub New()
|
||||||
SetDropdownButtonEnabled(_MultiSelect)
|
SetDropdownButtonEnabled(_MultiSelect)
|
||||||
|
|
||||||
|
UpdateSelectedValues(New List(Of String))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Const NAME_DATATABLE_INTERNAL = "__INTERNAL_DATATABLE__"
|
Private Const NAME_DATATABLE_INTERNAL = "__INTERNAL_DATATABLE__"
|
||||||
@ -159,14 +160,19 @@ Public Class RepositoryItemLookupControl3
|
|||||||
If MultiSelect = True Then
|
If MultiSelect = True Then
|
||||||
Select Case Values.Count
|
Select Case Values.Count
|
||||||
Case 0
|
Case 0
|
||||||
NullText = String.Empty
|
NullText = String.Format(_R.GetString("LookupControl_NoRecords"))
|
||||||
Case 1
|
Case 1
|
||||||
NullText = Values.FirstOrDefault()
|
NullText = Values.FirstOrDefault()
|
||||||
Case Else
|
Case Else
|
||||||
NullText = String.Format(_R.GetString("LookupControl_NRecords"), Values.Count)
|
NullText = String.Format(_R.GetString("LookupControl_NRecords"), Values.Count)
|
||||||
End Select
|
End Select
|
||||||
Else
|
Else
|
||||||
NullText = Values.FirstOrDefault()
|
Select Case Values.Count
|
||||||
|
Case 0
|
||||||
|
NullText = String.Format(_R.GetString("LookupControl_NoRecords"))
|
||||||
|
Case Else
|
||||||
|
NullText = Values.FirstOrDefault()
|
||||||
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' If No external Datasource is supplied, create one containing the currently selected values
|
' If No external Datasource is supplied, create one containing the currently selected values
|
||||||
@ -191,6 +197,10 @@ Public Class RepositoryItemLookupControl3
|
|||||||
RaiseEvent SelectedValuesChanged(Me, Values)
|
RaiseEvent SelectedValuesChanged(Me, Values)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Overrides Function ShouldSerializeNullText() As Boolean
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Overrides Sub CreateDefaultButton()
|
Public Overrides Sub CreateDefaultButton()
|
||||||
Dim oButtons As New List(Of EditorButton) From {
|
Dim oButtons As New List(Of EditorButton) From {
|
||||||
New EditorButton() With {
|
New EditorButton() With {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user