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); }
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); } } }
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)); }
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; }