示例#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
        /// <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);
                    }
                }
            }
        }