From 86ac68ed135e2d4fa16d2fb83e22680093fea06c Mon Sep 17 00:00:00 2001 From: jsmeyers Date: Fri, 14 Sep 2018 23:07:36 -0400 Subject: [PATCH] Added textcontains SQL to autocomplete field Autocomplete is a good field entry mechanism in search panel but if the user types quickly or hits enter prior to selection from autocomplete dropdown no results given. Adding the textcontains component allows it to work in both auto and textcontains mechanism. --- WebApp/App_Code/Services/SearchPanelHandler.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WebApp/App_Code/Services/SearchPanelHandler.cs b/WebApp/App_Code/Services/SearchPanelHandler.cs index d5aab68..ccc706f 100644 --- a/WebApp/App_Code/Services/SearchPanelHandler.cs +++ b/WebApp/App_Code/Services/SearchPanelHandler.cs @@ -85,6 +85,9 @@ private void DefaultMethod() switch (searchInputFieldRow.FieldType) { case "autocomplete": + where.Add(searchInputFieldRow.ColumnName + " like ?"); + parameters.Add("%" + criteria[criteriaID].ToString() + "%"); + break; case "date": case "list": case "number":