LookupGrid: version 0.2.0.0

This commit is contained in:
Jonathan Jenne
2019-08-29 11:12:59 +02:00
parent c9e0d8cec1
commit ba1806466d
6 changed files with 59 additions and 42 deletions

View File

@@ -16,10 +16,20 @@ Public Class LookupControl2
Public Delegate Sub SelectedValuesChangedHandler(sender As Object, SelectedValues As List(Of String))
Public Event SelectedValuesChanged As SelectedValuesChangedHandler
Public Property MultiSelect As Boolean
Public Property AllowAddNewValues As Boolean
Public Property PreventDuplicates As Boolean
Public Property DataSource As DataTable
Public Property MultiSelect As Boolean
Get
Return _Multiselect
End Get
Set(value As Boolean)
SetDropdownButtonEnabled(value)
_MultiSelect = value
End Set
End Property
Public Property SelectedValues As List(Of String)
Get
Return _SelectedValues
@@ -28,6 +38,7 @@ Public Class LookupControl2
UpdateSelectedValues(value)
End Set
End Property
Public Overloads Property [ReadOnly] As Boolean
Get
Return _ReadOnly
@@ -47,8 +58,10 @@ Public Class LookupControl2
Private Const TEXT_N_RECORDS = "{0} Datensätze ausgewählt"
Private _SelectedValues As New List(Of String)
Friend WithEvents fProperties As RepositoryItemGridLookUpEdit
Friend WithEvents fPropertiesView As DevExpress.XtraGrid.Views.Grid.GridView
Private _MultiSelect As Boolean
Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents GridView2 As DevExpress.XtraGrid.Views.Grid.GridView
Private _ReadOnly As Boolean = False
Shared Sub New()
@@ -183,31 +196,6 @@ Public Class LookupControl2
Return RepositoryItemLookupControl2.CustomEditName
End Get
End Property
Private Sub InitializeComponent()
Me.fProperties = New DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit()
Me.fPropertiesView = New DevExpress.XtraGrid.Views.Grid.GridView()
CType(Me.fProperties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'fProperties
'
Me.fProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.fProperties.Name = "fProperties"
Me.fProperties.PopupView = Me.fPropertiesView
'
'fPropertiesView
'
Me.fPropertiesView.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus
Me.fPropertiesView.Name = "fPropertiesView"
Me.fPropertiesView.OptionsSelection.EnableAppearanceFocusedCell = False
Me.fPropertiesView.OptionsView.ShowGroupPanel = False
CType(Me.fProperties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
End Class
<UserRepositoryItem("RegisterLookupControl2")>