1 write to owner
System.Windows.Forms (1)
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (1)
86this.owner = owner;
108 references to owner
System.Windows.Forms (108)
winforms\Managed\System\WinForms\DataGridViewDataConnection.cs (108)
319for (int i = 0; i < this.owner.Columns.Count; i++) 321if (this.owner.Columns[i].IsDataBound) 323this.owner.Columns[i].HeaderCell.SortGlyphDirection = SortOrder.None; 327this.owner.sortedColumn = null; 328this.owner.sortOrder = SortOrder.None; 335for (int i = 0; i < this.owner.Columns.Count; i++) 337DataGridViewColumn column = this.owner.Columns[i]; 353if (!setSortedColumnYet && !this.owner.InSortOperation) 355this.owner.sortedColumn = column; 356this.owner.sortOrder = sortOrder; 464this.owner.OnDataBindingComplete(e.ListChangedType); 496if (this.dataConnectionState[DATACONNECTIONSTATE_cachedAllowUserToAddRowsInternal] != this.owner.AllowUserToAddRowsInternal) 501this.owner.RefreshRows(!this.owner.InSortOperation /*scrollIntoView*/); 502this.owner.PushAllowUserToAddRows(); 514if (!this.dataConnectionState[DATACONNECTIONSTATE_finishedAddNew] && this.owner.newRowIndex == e.NewIndex) 516Debug.Assert(this.owner.AllowUserToAddRowsInternal, "how did we start the add new transaction when the AllowUserToAddRowsInternal is false?"); 535if (this.owner.Columns.Count > 0) 541this.owner.newRowIndex = -1; 542this.owner.AddNewRow(false /* createdByEditing */); 555this.owner.PopulateNewRowWithDefaultValues(); 565this.owner.RefreshRows(!this.owner.InSortOperation /*scrollIntoView*/); 566this.owner.PushAllowUserToAddRows(); 590this.currencyManager.List.Count == (this.owner.AllowUserToAddRowsInternal ? this.owner.Rows.Count - 1 : this.owner.Rows.Count)) 635this.owner.RefreshRows(!this.owner.InSortOperation /*scrollIntoView*/); 636this.owner.PushAllowUserToAddRows(); 660bool startUpdateInternal = this.owner.Visible; 663this.owner.BeginUpdateInternal(); 667this.owner.RefreshRows(!this.owner.InSortOperation /*scrollIntoView*/); 668this.owner.PushAllowUserToAddRows(); 679this.owner.EndUpdateInternal(false); 680this.owner.Invalidate(true); 685if (this.owner.NewRowIndex == -1 || e.NewIndex != this.owner.Rows.Count) 687this.owner.Rows.InsertInternal(e.NewIndex, this.owner.RowTemplateClone, true /*force*/); 698this.owner.Rows.RemoveAtInternal(e.NewIndex, true /*force*/); 708this.owner.InvalidateRows(lo, hi); 717for (int columnIndex = 0; columnIndex < this.owner.Columns.Count; columnIndex++) 719DataGridViewColumn dataGridViewColumn = this.owner.Columns[columnIndex]; 726this.owner.OnCellCommonChange(columnIndex, e.NewIndex); 731this.owner.OnCellCommonChange(columnIndex, e.NewIndex); 736this.owner.InvalidateCell(-1, e.NewIndex); 738if (this.owner.CurrentCellAddress.Y == e.NewIndex && this.owner.IsCurrentCellInEditMode) 740this.owner.RefreshEdit(); 747if (this.owner.Rows.Count > 0 && 749!this.owner.InSortOperation) 763if (this.owner.Columns.Count == 0) 765Debug.Assert(this.owner.CurrentCellAddress.X == -1); 773if (this.owner.Rows.Count == (owner.AllowUserToAddRowsInternal ? 1 : 0)) 799if (this.owner.AllowUserToAddRowsInternal && // condition 1. 803this.currencyManager.Position == this.owner.NewRowIndex && // condition 4. 804this.owner.CurrentCellAddress.Y != this.owner.NewRowIndex && // condition 5. 815if (!this.owner.InSortOperation) 849int result = this.owner.Rows.Count; 850if (this.owner.AllowUserToAddRowsInternal && this.owner.Rows.Count > 0) 852Debug.Assert(this.owner.NewRowIndex != -1, "the NewRowIndex is -1 only when AllowUserToAddRows is false"); 856if (this.owner.CurrentCellAddress.Y != this.owner.NewRowIndex || this.owner.IsCurrentRowDirty) 886this.owner.RefreshColumnsAndRows(); 887this.owner.OnDataBindingComplete(ListChangedType.Reset); 903this.owner.RefreshColumnsAndRows(); 913Debug.Assert(this.owner.AllowUserToAddRowsInternal, "how did we start an add new row transaction if the dataGridView control has AllowUserToAddRows == false?"); 915if (this.owner.newRowIndex == this.currencyManager.List.Count) 918deleteAddNewRow = (rowIndex == this.owner.newRowIndex - 1); 923Debug.Assert(this.owner.newRowIndex == this.currencyManager.List.Count - 1); 924deleteAddNewRow = (rowIndex == this.owner.newRowIndex); 1106this.dataConnectionState[DATACONNECTIONSTATE_cachedAllowUserToAddRowsInternal] = this.owner.AllowUserToAddRowsInternal; 1149if (this.owner.BindingContext == null) 1160if (this.dataSource != null && this.owner.BindingContext != null && !(this.dataSource == Convert.DBNull)) 1174this.currencyManager = this.owner.BindingContext[this.dataSource, this.dataMember] as CurrencyManager; 1225this.owner.OnDataErrorInternal(dgvdee); 1259this.owner.OnDataErrorInternal(dgvdee); 1292this.owner.OnDataErrorInternal(dgvdee); 1303if (this.owner.Columns.Count == 0) 1320int columnIndex = this.owner.CurrentCellAddress.X == -1 ? this.owner.FirstDisplayedColumnIndex : this.owner.CurrentCellAddress.X; 1325DataGridViewColumn dataGridViewColumn = this.owner.Columns.GetFirstColumn(DataGridViewElementStates.None); 1338if (!this.owner.SetCurrentCellAddressCore(-1, -1, 1346else if (rowIndex < this.owner.Rows.Count) 1357if ((this.owner.Rows.GetRowState(rowIndex) & DataGridViewElementStates.Visible) == 0) 1360this.owner.Rows[rowIndex].Visible = true; 1363if (rowIndex == this.owner.CurrentCellAddress.Y && columnIndex == this.owner.CurrentCellAddress.X) 1369if ((scrollIntoView && !this.owner.ScrollIntoView(columnIndex, rowIndex, true)) || 1370(columnIndex < this.owner.Columns.Count && rowIndex < this.owner.Rows.Count && 1371!this.owner.SetAndSelectCurrentCellAddress(columnIndex, rowIndex, 1454if (e.RowIndex != this.owner.NewRowIndex && 1493if (!this.dataConnectionState[DATACONNECTIONSTATE_finishedAddNew] && !this.owner.IsCurrentRowDirty) 1512else if (this.owner.IsCurrentRowDirty) 1546this.owner.OnDataErrorInternal(dgvdee); 1578Type columnType = this.owner.Columns[columnIndex].ValueType; 1589TypeConverter valueConverter = this.owner.GetCachedTypeConverter(valueType); 1614if (!this.owner.Created) 1620if (this.owner.BindingContext == null) 1633CurrencyManager cm = this.owner.BindingContext[newDataSource] as CurrencyManager;