protected override CriteriaOperator ConvertGridFilterToDataFilter(CriteriaOperator criteria) { string originalFindFilterText = Convert.ToString(typeof(ColumnView).InvokeMember("findFilterText", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.GetField, null, this, new object[0])); if (SimpleSearch) { if (!(string.IsNullOrEmpty(originalFindFilterText))) { typeof(ColumnView).InvokeMember("findFilterText", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetField, null, this, new object[] { string.Concat("\"", originalFindFilterText, "\"") }); } CriteriaOperator findCriteria = null; FindSearchParserResults _lastParserResults = null; if (!(string.IsNullOrEmpty(FindFilterText))) { _lastParserResults = (new FindSearchParser()).Parse(FindFilterText, GetFindToColumnsCollection()); typeof(ColumnView).GetField("lastParserResults", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(this, _lastParserResults); if (!IsServerMode) { _lastParserResults.AppendColumnFieldPrefixes(); } findCriteria = DxFtsContainsHelperAlt.Create(_lastParserResults, FilterCondition.Contains, IsServerMode); } typeof(ColumnView).InvokeMember("findFilterText", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.SetField, null, this, new object[] { originalFindFilterText }); return(criteria & findCriteria); } return(base.ConvertGridFilterToDataFilter(criteria)); }
public static CriteriaOperator ConvertFindPanelTextToCriteriaOperator(string findPanelText, GridView view, bool applyPrefixes) { if (!string.IsNullOrEmpty(findPanelText)) { FindSearchParserResults parseResult = new FindSearchParser().Parse(findPanelText, GetFindToColumnsCollection(view)); if (applyPrefixes) { parseResult.AppendColumnFieldPrefixes(); } return(DxFtsContainsHelperAlt.Create(parseResult, FilterCondition.Contains, false)); } return(null); }