/// <summary>
 /// Raises the CellRemoved event
 /// </summary>
 /// <param name="e">A RowEventArgs that contains the event data</param>
 protected virtual void OnCellRemoved(RowEventArgs e)
 {
     this.owner.OnCellRemoved(e);
 }
 /// <summary>
 /// Raises the RowPropertyChanged event
 /// </summary>
 /// <param name="e">A RowEventArgs that contains the event data</param>
 internal void OnRowPropertyChanged(RowEventArgs e)
 {
     if (this.Table != null)
     {
         this.Table.OnRowPropertyChanged(e);
     }
 }
 /// <summary>
 /// Raises the CellRemoved event
 /// </summary>
 /// <param name="e">A RowEventArgs that contains the event data</param>
 internal void OnCellRemoved(RowEventArgs e)
 {
     if (this.Table != null)
     {
         this.Table.OnCellRemoved(e);
     }
 }
Example #4
0
        /// <summary>
        /// Raises the PropertyChanged event
        /// </summary>
        /// <param name="e">A RowEventArgs that contains the event data</param>
        protected virtual void OnPropertyChanged(RowEventArgs e)
        {
            e.SetRowIndex(this.Index);

            if (this.CanRaiseEvents)
            {
                if (this.TableModel != null)
                {
                    this.TableModel.OnRowPropertyChanged(e);
                }

                if (PropertyChanged != null)
                {
                    PropertyChanged(this, e);
                }
            }
        }
Example #5
0
        /// <summary>
        /// Raises the CellRemoved event
        /// </summary>
        /// <param name="e">A RowEventArgs that contains the event data</param>
        protected internal virtual void OnCellRemoved(RowEventArgs e)
        {
            e.SetRowIndex(this.Index);

            if (e.Cell != null)
            {
                if (e.Cell.Row == this)
                {
                    e.Cell.InternalRow = null;
                    e.Cell.InternalIndex = -1;

                    if (e.Cell.Selected)
                    {
                        e.Cell.SetSelected(false);

                        this.InternalSelectedCellCount--;

                        if (this.SelectedCellCount == 0 && this.TableModel != null)
                        {
                            this.TableModel.Selections.RemoveRow(this);
                        }
                    }
                }
            }
            else
            {
                if (e.CellFromIndex == -1 && e.CellToIndex == -1)
                {
                    if (this.SelectedCellCount != 0 && this.TableModel != null)
                    {
                        this.InternalSelectedCellCount = 0;

                        this.TableModel.Selections.RemoveRow(this);
                    }
                }
            }

            this.UpdateCellIndicies(e.CellFromIndex);

            if (this.CanRaiseEvents)
            {
                if (this.TableModel != null)
                {
                    this.TableModel.OnCellRemoved(e);
                }

                if (CellRemoved != null)
                {
                    CellRemoved(this, e);
                }
            }
        }
Example #6
0
        /// <summary>
        /// Raises the CellAdded event
        /// </summary>
        /// <param name="e">A RowEventArgs that contains the event data</param>
        protected internal virtual void OnCellAdded(RowEventArgs e)
        {
            e.SetRowIndex(this.Index);

            e.Cell.InternalRow = this;
            e.Cell.InternalIndex = e.CellFromIndex;
            e.Cell.SetSelected(false);

            this.UpdateCellIndicies(e.CellFromIndex);

            if (this.CanRaiseEvents)
            {
                if (this.TableModel != null)
                {
                    this.TableModel.OnCellAdded(e);
                }

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