public static PropertyColumnMetamodel Create(LambdaExpression property, int width, ColumnWidthMode widthMode, FilterMetamodel filterMetamodel)
        {
            var name = ObjectHelper.GetPropertyName(property);
            var caption = AttributesHelper.GetPropertyDisplayName(property) ?? property.Name;   // TODO: maybe better to provide explicite caption parameter?

            return new PropertyColumnMetamodel(name, caption, width, widthMode, property.ReturnType, filterMetamodel);
        }
示例#2
0
        private static void ConfigureSearch(Column column, FilterMetamodel filter)
        {
            var filterOperator = filter.Operator;

            if (filterOperator == FilterOperator.Auto)
            {
                throw new ApplicationException("Invalid FilterOperator value on this level. This should be resolved and replaced during GridMetaModel building.");
            }

            if (filterOperator == FilterOperator.Disabled)
            {
                column.SetSearch(false);
            }
            else
            {
                var searchtype = filterToSearchtypeMap[filterOperator];

                column.SetSearchType(searchtype);

                if (searchtype == Searchtype.Select)
                {
                    column.SetSearchTerms(filter.SelectFilterMap);
                }
            }
        }
示例#3
0
        public static PropertyColumnMetamodel Create(LambdaExpression property, int width, ColumnWidthMode widthMode, FilterMetamodel filterMetamodel)
        {
            var name    = ObjectHelper.GetPropertyName(property);
            var caption = AttributesHelper.GetPropertyDisplayName(property) ?? property.Name;   // TODO: maybe better to provide explicite caption parameter?

            return(new PropertyColumnMetamodel(name, caption, width, widthMode, property.ReturnType, filterMetamodel));
        }
示例#4
0
 public PropertyColumnMetamodel(string name, string caption, int width, ColumnWidthMode widthMode, Type propertyType, FilterMetamodel filter)
     : base(name, caption, width, widthMode)
 {
     this.PropertyType = propertyType;
     this.Filter       = filter;
 }
 public PropertyColumnMetamodel(string name, string caption, int width, ColumnWidthMode widthMode, Type propertyType, FilterMetamodel filter)
     : base(name, caption, width, widthMode)
 {
     this.PropertyType = propertyType;
     this.Filter = filter;
 }