コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="filter"></param>
        protected virtual void OnFilterRemove(GridFilter filter)
        {
            if (filter.MenuItems.Count > 0)
            {
                foreach (MenuItemBase item in filter.MenuItems)
                {
                    if (this.FeatureOwner.Controls.Contains(item))
                    {
                        this.FeatureOwner.Controls.Remove(item);
                    }

                    if (this.FeatureOwner.LazyItems.Contains(item))
                    {
                        this.FeatureOwner.LazyItems.Remove(item);
                    }
                }
            }
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="filter"></param>
        protected virtual void OnFilterRemove(GridFilter filter)
        {
            if (filter.MenuItems.Count > 0)
            {
                foreach (MenuItemBase item in filter.MenuItems)
                {
                    if (this.FeatureOwner.Controls.Contains(item))
                    {
                        this.FeatureOwner.Controls.Remove(item);
                    }

                    if (this.FeatureOwner.LazyItems.Contains(item))
                    {
                        this.FeatureOwner.LazyItems.Remove(item);
                    }
                }
            }

            if (filter.GetType() == typeof(ListFilter))
            {
                Menu menu = (filter as ListFilter).MenuConfig;

                if (menu != null)
                {
                    if (!this.FeatureOwner.Controls.Contains(menu))
                    {
                        this.FeatureOwner.Controls.Add(menu);
                    }

                    if (!this.FeatureOwner.LazyItems.Contains(menu))
                    {
                        this.FeatureOwner.LazyItems.Add(menu);
                    }
                }
            }
        }
コード例 #3
0
 /// <summary>
 /// Adds a filter to the collection and observes it for state change.
 /// </summary>
 /// <param name="filter">A filter configuration</param>
 public virtual void AddFilter(GridFilter filter)
 {
     RequestManager.EnsureDirectEvent();
     this.Call("addFilter", new ClientConfig().Serialize(filter));
 }
コード例 #4
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="filter"></param>
        protected virtual void OnFilterRemove(GridFilter filter)
        {
            if (filter.MenuItems.Count > 0)
            {                
                foreach (MenuItemBase item in filter.MenuItems)
                {
                    if (this.FeatureOwner.Controls.Contains(item))
                    {
                        this.FeatureOwner.Controls.Remove(item);
                    }

                    if (this.FeatureOwner.LazyItems.Contains(item))
                    {
                        this.FeatureOwner.LazyItems.Remove(item);
                    }
                }
            }
        }
コード例 #5
0
 private void Filters_AfterItemRemove(GridFilter item)
 {
     this.OnFilterRemove(item);
 }
コード例 #6
0
 private void Filters_AfterItemAdd(GridFilter item)
 {
     item.Plugin = this;
 }
コード例 #7
0
 /// <summary>
 /// Adds a filter to the collection and observes it for state change.
 /// </summary>
 /// <param name="filter">A filter configuration</param>
 public virtual void AddFilter(GridFilter filter)
 {
     RequestManager.EnsureDirectEvent();
     this.Call("addFilter", new ClientConfig().Serialize(filter));
 }
コード例 #8
0
 private void Filters_AfterItemRemove(GridFilter item)
 {
     this.OnFilterRemove(item);
 }
コード例 #9
0
 private void Filters_AfterItemAdd(GridFilter item)
 {
     item.Plugin = this;
 }
コード例 #10
0
ファイル: GridFilters.cs プロジェクト: emayk/Ext.NET.Pro
        /// <summary>
        /// 
        /// </summary>
        /// <param name="filter"></param>
        protected virtual void OnFilterRemove(GridFilter filter)
        {
            if (filter.MenuItems.Count > 0)
            {                
                foreach (MenuItemBase item in filter.MenuItems)
                {
                    if (this.FeatureOwner.Controls.Contains(item))
                    {
                        this.FeatureOwner.Controls.Remove(item);
                    }

                    if (this.FeatureOwner.LazyItems.Contains(item))
                    {
                        this.FeatureOwner.LazyItems.Remove(item);
                    }
                }
            }

            if (filter.GetType() == typeof(ListFilter))
            {
                Menu menu = (filter as ListFilter).MenuConfig;

                if (menu != null)
                {
                    if (!this.FeatureOwner.Controls.Contains(menu))
                    {
                        this.FeatureOwner.Controls.Add(menu);
                    }

                    if (!this.FeatureOwner.LazyItems.Contains(menu))
                    {
                        this.FeatureOwner.LazyItems.Add(menu);
                    }
                }
            }
        }