/// <summary> /// Validates the expression. /// </summary> /// <returns>True, if Expression is valid.</returns> public bool ValidateExpression() { try { if (_attributeSource != null) { _attributeSource.GetCounts(new[] { rtbFilterText.Text }, null, 1); } else if (_table != null) { _table.Select(rtbFilterText.Text); } } catch (Exception e) { lblResult.Text = e.Message; lblResult.ForeColor = Color.Red; return(false); } lblResult.Text = SymbologyFormsMessageStrings.SQLQueryControl_ExpressionIsValid; lblResult.ForeColor = Color.Black; return(true); }