public IList GetLookupSource(string filter)
        {
            SearchCriteriaBuilder criteriaBuilder = new SearchCriteriaBuilder();

            criteriaBuilder.TypeInfo = Helper.LookupObjectTypeInfo;
            criteriaBuilder.SearchInStringPropertiesOnly = false;
            criteriaBuilder.SearchText = filter;
            criteriaBuilder.SearchMode = SearchMode.SearchInObject;
            criteriaBuilder.SetSearchProperties(Helper.LookupObjectTypeInfo.DefaultMember.BindingName);
            return(ObjectSpace.GetObjects(Helper.LookupObjectType, criteriaBuilder.BuildCriteria()));
        }
        public IList GetLookupSource(string filter)
        {
            SearchCriteriaBuilder criteriaBuilder = new SearchCriteriaBuilder();

            criteriaBuilder.TypeInfo = Helper.LookupObjectTypeInfo;
            criteriaBuilder.SearchInStringPropertiesOnly = false;
            criteriaBuilder.SearchText = filter;
            criteriaBuilder.SearchMode = SearchMode.SearchInObject;
            criteriaBuilder.SetSearchProperties("FullName", "SpouseName");
            return(ObjectSpace.GetObjects(Helper.LookupObjectType, criteriaBuilder.BuildCriteria()));
            //return ObjectSpace.GetObjects(Helper.LookupObjectType, new BinaryOperator(Helper.DisplayMember.Name, "%" + filter + "%", BinaryOperatorType.Like));
        }
 private IEnumerable<string> GetFullTextSearchProperties(FullTextSearchTargetPropertiesMode fullTextSearchTargetPropertiesMode)
 {
     var criteriaBuilder = new SearchCriteriaBuilder(View.ObjectTypeInfo) {IncludeNonPersistentMembers = false};
     switch (fullTextSearchTargetPropertiesMode)
     {
         case FullTextSearchTargetPropertiesMode.AllSearchableMembers:
             criteriaBuilder.FillSearchProperties();
             criteriaBuilder.AddSearchProperties(GetShownProperties());
             break;
         case FullTextSearchTargetPropertiesMode.VisibleColumns:
             var shownProperties = new List<string>(GetShownProperties());
             string friendlyKeyMemberName = FriendlyKeyPropertyAttribute.FindFriendlyKeyMemberName(View.ObjectTypeInfo, true);
             if (!string.IsNullOrEmpty(friendlyKeyMemberName) && !shownProperties.Contains(friendlyKeyMemberName))
             {
                 shownProperties.Add(friendlyKeyMemberName);
             }
             criteriaBuilder.SetSearchProperties(shownProperties);
             break;
         default:
             throw new ArgumentException(fullTextSearchTargetPropertiesMode.ToString(), "fullTextSearchTargetPropertiesMode");
     }
     return criteriaBuilder.SearchProperties;
 }
 public IList GetLookupSource(string filter) {
     var criteriaBuilder = new SearchCriteriaBuilder {
         TypeInfo = Helper.LookupObjectTypeInfo,
         SearchInStringPropertiesOnly = false,
         SearchText = filter,
         SearchMode = SearchMode.SearchInObject
     };
     criteriaBuilder.SetSearchProperties(Helper.LookupObjectTypeInfo.DefaultMember.BindingName);
     return ObjectSpace.GetObjects(Helper.LookupObjectType, criteriaBuilder.BuildCriteria());
 }