示例#1
0
        public void Filterable_SetsType()
        {
            GridFilterType?actual   = column.Filterable(GridFilterType.Double).Filter.Type;
            GridFilterType?expected = GridFilterType.Double;

            Assert.Equal(expected, actual);
        }
示例#2
0
        public void Filterable_SetsIsEnabled(Boolean isEnabled)
        {
            Boolean?actual   = column.Filterable(isEnabled).Filter.IsEnabled;
            Boolean?expected = isEnabled;

            Assert.Equal(expected, actual);
        }
        public static IGridColumn <T> Filterable <T, TQ>(this IGridColumn <T> column, bool isColumnFilterable, Expression <Func <T, TQ> > filterProperty) where T : class
        {
            if (filterProperty.Body.NodeType != ExpressionType.MemberAccess)
            {
                throw new ArgumentException("filterProperty");
            }
            var propertyName = ((MemberExpression)filterProperty.Body).Member.Name;

            return(column.Filterable(isColumnFilterable, propertyName));
        }
        public void Filterable_Configure_SetsIsEnabled(Boolean?current, Boolean enabled)
        {
            column.Filter.IsEnabled = current;

            Boolean?actual   = column.Filterable(_ => { }).Filter.IsEnabled;
            Boolean?expected = enabled;

            Assert.Equal(expected, actual);
        }
 public static IGridColumn <T> Filterable <T>(this IGridColumn <T> column, bool isColumnFilterable) where T : class
 {
     return(column.Filterable(isColumnFilterable, ((GridColumn <T>)column).Name));
 }