Beispiel #1
0
        /// <summary>
        /// Raises the RowRemoved event
        /// </summary>
        /// <param name="e">A TableModelEventArgs that contains the event data</param>
        protected internal virtual void OnRowRemoved(TableModelEventArgs e)
        {
            if (e.Row != null && e.Row.TableModel == this)
            {
                e.Row.InternalTableModel = null;
                e.Row.InternalIndex = -1;

                if (e.Row.AnyCellsSelected)
                {
                    e.Row.ClearSelection();

                    this.Selections.RemoveRow(e.Row);
                }
            }

            this.UpdateRowIndicies(e.RowFromIndex);

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

                if (RowRemoved != null)
                {
                    RowRemoved(this, e);
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Raises the RowAdded event
        /// </summary>
        /// <param name="e">A TableModelEventArgs that contains the event data</param>
        protected internal virtual void OnRowAdded(TableModelEventArgs e)
        {
            e.Row.InternalTableModel = this;
            e.Row.InternalIndex = e.RowFromIndex;
            e.Row.ClearSelection();

            this.UpdateRowIndicies(e.RowFromIndex);

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

                if (RowAdded != null)
                {
                    RowAdded(this, e);
                }
            }
        }
Beispiel #3
0
 /// <summary>
 /// Raises the RowRemoved event
 /// </summary>
 /// <param name="e">A TableModelEventArgs that contains the event data</param>
 protected virtual void OnRowRemoved(TableModelEventArgs e)
 {
     this.owner.OnRowRemoved(e);
 }
Beispiel #4
0
		/// <summary>
		/// Raises the RowRemoved event
		/// </summary>
		/// <param name="e">A TableModelEventArgs that contains the event data</param>
		protected internal virtual void OnRowRemoved(TableModelEventArgs e)
		{
			if (this.CanRaiseEvents)
			{
				this.PerformLayout();
				this.Invalidate();

				if (RowRemoved != null)
				{
					RowRemoved(e.TableModel, e);
				}
			}
		}
Beispiel #5
0
        /// <summary>
        /// Raises the RowRemoved event
        /// </summary>
        /// <param name="e">A TableModelEventArgs that contains the event data</param>
        protected internal virtual void OnRowRemoved(TableModelEventArgs e)
        {
            if (this.CanRaiseEvents)
            {
                this.PerformLayout();
                this.Invalidate();

                // Removing a parent row should also remove the child rows...
                // Fix (Colby Dillion)
                if (e.Row != null && e.Row.SubRows != null)
                {
                    foreach (Row row in e.Row.SubRows)
                    {
                        e.TableModel.Rows.Remove(row);
                    }
                }

                if (RowRemoved != null)
                {
                    RowRemoved(e.TableModel, e);
                }
            }
        }
Beispiel #6
0
 /// <summary>
 /// Raises the RowAdded event
 /// </summary>
 /// <param name="e">A TableModelEventArgs that contains the event data</param>
 protected internal virtual void OnRowAdded(TableModelEventArgs e)
 {
     // tunned by Kosmokrat Hismoom on 9 jan 2006
     if (this.CanRaiseEvents)
     {
         this.PerformLayout();
         Rectangle rowRect = this.RowRect(e.Row.Index);
         if ((rowRect != Rectangle.Empty)
             && (rowRect.IntersectsWith(this.CellDataRect)))
         {
             this.Invalidate();
         }
         if (RowAdded != null)
         {
             RowAdded(e.TableModel, e);
         }
     }
 }