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