/// <summary>
		/// Raises the ColumnRemoved event
		/// </summary>
		/// <param name="e">A ColumnModelEventArgs that contains the event data</param>
		protected virtual void OnColumnRemoved(ColumnModelEventArgs e)
		{
			this.owner.OnColumnRemoved(e);
		}
Esempio n. 2
0
        /// <summary>
        /// Raises the ColumnRemoved event
        /// </summary>
        /// <param name="e">A ColumnModelEventArgs that contains the event data</param>
        protected internal virtual void OnColumnRemoved(ColumnModelEventArgs e)
        {
            if (e.Column != null && e.Column.ColumnModel == this)
            {
                e.Column.ColumnModel = null;
            }

            if (this.CanRaiseEvents)
            {
                if (this.Table != null)
                {
                    this.Table.OnColumnRemoved(e);
                }

                if (ColumnRemoved != null)
                {
                    ColumnRemoved(this, e);
                }
            }
        }
Esempio n. 3
0
		/// <summary>
		/// Raises the ColumnRemoved event
		/// </summary>
		/// <param name="e">A ColumnModelEventArgs that contains the event data</param>
		protected internal virtual void OnColumnRemoved(ColumnModelEventArgs e)
		{
			if (this.CanRaiseEvents)
			{
				this.PerformLayout();
				this.Invalidate();

				if (ColumnRemoved != null)
				{
					ColumnRemoved(this, e);
				}
			}
		}
Esempio n. 4
0
        /// <summary>
        /// Raises the ColumnAdded event
        /// </summary>
        /// <param name="e">A ColumnModelEventArgs that contains the event data</param>
        protected internal virtual void OnColumnAdded(ColumnModelEventArgs e)
        {
            e.Column.ColumnModel = this;

            if (!this.ContainsCellRenderer(e.Column.GetDefaultRendererName()))
            {
                this.SetCellRenderer(e.Column.GetDefaultRendererName(), e.Column.CreateDefaultRenderer());
            }

            if (!this.ContainsCellEditor(e.Column.GetDefaultEditorName()))
            {
                this.SetCellEditor(e.Column.GetDefaultEditorName(), e.Column.CreateDefaultEditor());
            }

            if (this.CanRaiseEvents)
            {
                if (this.Table != null)
                {
                    this.Table.OnColumnAdded(e);
                }

                if (ColumnAdded != null)
                {
                    ColumnAdded(this, e);
                }
            }
        }