示例#1
0
        /// <summary>
        /// Attaches Multi-Select filter to column
        /// </summary>
        /// <param name="column">Column configuration</param>
        /// <param name="sourceColumn">Source column</param>
        /// <returns></returns>
        public static MultiColumnFilter <TSourceData, TSourceColumn> FilterMultiSelectNoUi <TSourceData, TTableData, TTableColumn, TSourceColumn>(
            this ColumnUsage <TSourceData, TTableData, TTableColumn> column,
            Expression <Func <TSourceData, TSourceColumn> > sourceColumn
            ) where TTableData : new()
        {
            var filter = MultiColumnFilter <TSourceData, TSourceColumn> .Create(column.ColumnProperty, column.Configurator, sourceColumn);

            var configurator = column;

            configurator.TableConfigurator.RegisterFilter(filter);
            return(filter);
        }
示例#2
0
        /// <summary>
        /// Attaches Multi-Select filter to column
        /// </summary>
        /// <param name="column">Column configuration</param>
        /// <param name="filterDelegate">Filtering function base on value received from filter</param>
        /// <returns></returns>
        public static MultiColumnFilter <TSourceData, TSourceColumn> FilterMultiSelectNoUiBy <TSourceData, TTableData, TTableColumn, TSourceColumn>(
            this ColumnUsage <TSourceData, TTableData, TTableColumn> column,
            Func <IQueryable <TSourceData>, IEnumerable <TSourceColumn>, IQueryable <TSourceData> > filterDelegate)
            where TTableData : new()
        {
            var filter = MultiColumnFilter <TSourceData, TSourceColumn> .Create(column.ColumnProperty, column.Configurator, filterDelegate);

            var configurator = column;

            configurator.TableConfigurator.RegisterFilter(filter);
            return(filter);
        }