Example #1
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);
				}
			}
		}
Example #2
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);
				}
			}
		}
		/// <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);
		}