From 0d4c6192dd1be7017df6170c47d9e2c5d5cbdfdd Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 9 Mar 2020 16:40:53 +0100 Subject: [PATCH] add default value for lookupgrid --- Global_Indexer/ClassControls.vb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Global_Indexer/ClassControls.vb b/Global_Indexer/ClassControls.vb index d202b26..c75b59a 100644 --- a/Global_Indexer/ClassControls.vb +++ b/Global_Indexer/ClassControls.vb @@ -75,6 +75,14 @@ Public Class ClassControls } } + If Not String.IsNullOrEmpty(Vorgabe) Then + Dim oDefaultValues = Vorgabe. + Split(",").ToList(). + Select(Function(item) item.Trim()). + ToList() + oControl.SelectedValues = oDefaultValues + End If + AddHandler oControl.SelectedValuesChanged, AddressOf Lookup_SelectedValuesChanged oConnectionString = ClassFormFunctions.GetConnectionString(conid) @@ -87,6 +95,8 @@ Public Class ClassControls End If End If + + Return oControl Catch ex As Exception LOGGER.Info(" - Unvorhergesehener Unexpected error in AddVorschlag_ComboBox - Indexname: " & indexname & " - Fehler: " & vbNewLine & ex.Message)