From b58b5694d8ad1b2a0241e7ffe773edfeaeb88ae5 Mon Sep 17 00:00:00 2001 From: Digital Data - Marlon Schreiber Date: Thu, 23 May 2019 11:29:54 +0200 Subject: [PATCH] lookupgrid --- Controls.LookupGrid/LookupControl.vbproj | 3 + Controls.LookupGrid/LookupControl2.resx | 123 ++++++++++++++++++ Controls.LookupGrid/LookupControl2.vb | 27 ++++ Controls.LookupGrid/frmLookupGrid.Designer.vb | 1 + Controls.LookupGrid/frmLookupGrid.vb | 5 + 5 files changed, 159 insertions(+) create mode 100644 Controls.LookupGrid/LookupControl2.resx diff --git a/Controls.LookupGrid/LookupControl.vbproj b/Controls.LookupGrid/LookupControl.vbproj index 9ebcc41b..42070850 100644 --- a/Controls.LookupGrid/LookupControl.vbproj +++ b/Controls.LookupGrid/LookupControl.vbproj @@ -151,6 +151,9 @@ LookupControl.vb + + LookupControl2.vb + VbMyResourcesResXFileCodeGenerator diff --git a/Controls.LookupGrid/LookupControl2.resx b/Controls.LookupGrid/LookupControl2.resx new file mode 100644 index 00000000..e5858cc2 --- /dev/null +++ b/Controls.LookupGrid/LookupControl2.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + False + + \ No newline at end of file diff --git a/Controls.LookupGrid/LookupControl2.vb b/Controls.LookupGrid/LookupControl2.vb index 54aa393d..5da0b852 100644 --- a/Controls.LookupGrid/LookupControl2.vb +++ b/Controls.LookupGrid/LookupControl2.vb @@ -44,6 +44,8 @@ Public Class LookupControl2 Private Const TEXT_N_RECORDS = "{0} Datensätze ausgewählt" Private _SelectedValues As List(Of String) + Friend WithEvents fProperties As RepositoryItemGridLookUpEdit + Friend WithEvents fPropertiesView As DevExpress.XtraGrid.Views.Grid.GridView Private _ReadOnly As Boolean = False Shared Sub New() @@ -168,6 +170,31 @@ 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 diff --git a/Controls.LookupGrid/frmLookupGrid.Designer.vb b/Controls.LookupGrid/frmLookupGrid.Designer.vb index cc90e703..e969bbe8 100644 --- a/Controls.LookupGrid/frmLookupGrid.Designer.vb +++ b/Controls.LookupGrid/frmLookupGrid.Designer.vb @@ -88,6 +88,7 @@ Partial Class frmLookupGrid Me.MinimumSize = New System.Drawing.Size(400, 300) Me.Name = "frmLookupGrid" Me.Text = "Wählen Sie einen Wert:" + Me.TopMost = True CType(Me.gridLookup, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.viewLookup, System.ComponentModel.ISupportInitialize).EndInit() Me.Panel1.ResumeLayout(False) diff --git a/Controls.LookupGrid/frmLookupGrid.vb b/Controls.LookupGrid/frmLookupGrid.vb index 44517082..a364640d 100644 --- a/Controls.LookupGrid/frmLookupGrid.vb +++ b/Controls.LookupGrid/frmLookupGrid.vb @@ -71,6 +71,7 @@ Public Class frmLookupGrid ' Focus auf Find panel setzen view.ShowFindPanel() + Me.BringToFront() End Sub Private Sub SyncItemsWithView(view As GridView) @@ -192,4 +193,8 @@ Public Class frmLookupGrid End If End If End Sub + + Private Sub frmLookupGrid_Shown(sender As Object, e As EventArgs) Handles Me.Shown + Me.BringToFront() + End Sub End Class \ No newline at end of file