示例#1
0
        protected override void RemoveItem(int columnIndex)
        {
            //



            if (this._owningGrid.InDisplayIndexAdjustments)
            {
                // We are within columns display indexes adjustments. We do not allow changing the column collection while adjusting display indexes.
                throw DataGridError.DataGrid.CannotChangeColumnCollectionWhileAdjustingDisplayIndexes();
            }

            Debug.Assert(columnIndex >= 0 && columnIndex < this.ItemsInternal.Count);
            Debug.Assert(this._owningGrid != null);

            DataGridColumnBase dataGridColumn = this.ItemsInternal[columnIndex];
            //



            DataGridCellCoordinates newCurrentCellCoordinates = this._owningGrid.OnRemovingColumn(dataGridColumn);

            InvalidateCachedColumnsOrder();
            this.ItemsInternal.RemoveAt(columnIndex);
            dataGridColumn.OwningGrid = null;
            this._owningGrid.OnRemovedColumn_PreNotification(dataGridColumn);
            this._owningGrid.OnColumnCollectionChanged_PreNotification(false /*columnsGrew*/);
            base.RemoveItem(columnIndex);
            this._owningGrid.OnRemovedColumn_PostNotification(newCurrentCellCoordinates);
            this._owningGrid.OnColumnCollectionChanged_PostNotification(false /*columnsGrew*/);
        }
示例#2
0
        public override bool Equals(object o)
        {
            DataGridCellCoordinates dataGridCellCoordinates = o as DataGridCellCoordinates;

            if (dataGridCellCoordinates != null)
            {
                return(dataGridCellCoordinates.ColumnIndex == this.ColumnIndex && dataGridCellCoordinates.RowIndex == this.RowIndex);
            }
            return(false);
        }
示例#3
0
 public DataGridCellCoordinates(DataGridCellCoordinates dataGridCellCoordinates) : this(dataGridCellCoordinates.ColumnIndex, dataGridCellCoordinates.RowIndex)
 {
 }
示例#4
0
 public DataGridCellCoordinates(DataGridCellCoordinates dataGridCellCoordinates) : this(dataGridCellCoordinates.ColumnIndex, dataGridCellCoordinates.RowIndex)
 { 
 }