private void EnsureInit(IQueryableDataSource dataSource)
        {
            if (_filterUserControl == null)
            {
                MetaTable table = DynamicDataExtensions.GetMetaTable(dataSource, Context);
                Column             = table.GetColumn(DataField);
                _filterUserControl = _filterLoader(Column, FilterUIHint);
                _filterUserControl.Initialize(Column, dataSource, Context);

                _filterUserControl.FilterChanged += new EventHandler(Child_FilterChanged);

                Controls.Add(_filterUserControl);
            }
        }
Beispiel #2
0
        public virtual QueryableFilterUserControl CreateFilterControl(MetaColumn column, string filterUIHint)
        {
            if (column == null)
            {
                throw new ArgumentNullException("column");
            }
            string filterTemplatePath = GetFilterVirtualPathWithCaching(column, filterUIHint);

            Debug.Assert(filterTemplatePath != null);

            QueryableFilterUserControl filter = (QueryableFilterUserControl)BuildManager.CreateInstanceFromVirtualPath(
                filterTemplatePath, typeof(QueryableFilterUserControl));

            return(filter);
        }
        private void EnsureInit(IQueryableDataSource dataSource) {
            if (_filterUserControl == null) {
                MetaTable table = DynamicDataExtensions.GetMetaTable(dataSource, Context);
                Column = table.GetColumn(DataField);
                _filterUserControl = _filterLoader(Column, FilterUIHint);
                _filterUserControl.Initialize(Column, dataSource, Context);

                _filterUserControl.FilterChanged += new EventHandler(Child_FilterChanged);

                Controls.Add(_filterUserControl);
            }
        }