3 writes to DataConnection
System.Windows.Forms (3)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (3)
1892DataConnection ??= new DataGridViewDataConnection(this); 1934DataConnection = new DataGridViewDataConnection(this); 1948DataConnection = null;
79 references to DataConnection
System.Windows.Forms (79)
System\Windows\Forms\Controls\DataGridView\DataGridView.cs (11)
658DataConnection!.ResetCachedAllowUserToAddRowsInternal(); 668: AllowUserToAddRows && DataConnection!.AllowAdd; 696: AllowUserToDeleteRows && DataConnection!.AllowRemove; 1886get => DataConnection is null ? string.Empty : DataConnection.DataMember; 1894DataConnection.SetDataConnection(DataSource, value); 1915get => DataConnection?.DataSource; 1932if (DataConnection is null) 1935DataConnection.SetDataConnection(value, DataMember); 1939if (DataConnection.ShouldChangeDataMember(value)) 1945DataConnection.SetDataConnection(value, DataMember);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (56)
1552if (DataConnection is not null && DataConnection.BoundColumnIndex(dataGridViewCols[i].DataPropertyName) != -1) 3201DataConnection!.CancelRowEdit(restoreRow: true, addNewFinished: _dataGridViewState1[State1_NewRowEdited]); 3202if ((DataConnection.List?.Count ?? 0) == 0) 3225DataConnection.OnNewRowNeeded(); 3329if (DataConnection is null) 3338if (DataConnection.ProcessingMetaDataChanges) 3344if (DataConnection.CancellingRowEdit && !DataConnection.RestoreRow) 3350if ((DataConnection.CurrencyManager?.Count ?? 0) <= _ptCurrentCell.Y) 3356if (DataConnection.PositionChangingOutsideDataGridView) 3364if (DataConnection.ListWasReset) 3592return !Columns[columnIndex].IsDataBound || DataConnection is null || DataConnection.AllowEdit; 5612DataConnection?.Dispose(); 10449DataGridViewDataConnection? conn = DataConnection; 11453if (DataConnection is not null) 11458DataConnection.SetDataConnection(DataSource, DataMember); 11478if (DataConnection.CurrencyManager is not null) 13656&& (DataConnection!.List is IBindingList) 13657&& ((IBindingList)DataConnection.List).SupportsSorting 14789Debug.Assert(DataConnection is not null); 14790Debug.Assert(DataConnection.CurrencyManager is not null); 14791Debug.Assert(DataConnection.CurrencyManager.Position == _ptCurrentCell.Y); 14889if (DataConnection is not null && DataConnection.CurrencyManager is not null) 14901if (DataConnection is not null && DataConnection.CurrencyManager is not null) 17671if (DataConnection is not null && DataConnection.InterestedInRowEvents) 17673DataConnection.OnNewRowNeeded(); 17708if (DataConnection is not null 17709&& DataConnection.InterestedInRowEvents 17710&& !DataConnection.PositionChangingOutsideDataGridView 17711&& !DataConnection.ListWasReset 17712&& (!calledAddNewOnTheDataConnection || (DataConnection.List?.Count ?? 0) > 0)) 17714DataConnection.OnRowEnter(dgvce); 18723if (DataConnection is not null 18724&& DataConnection.InterestedInRowEvents 18725&& !DataConnection.PositionChangingOutsideDataGridView 18726&& !DataConnection.ListWasReset) 18728DataConnection.OnRowValidating(dgvcce); 19964int rowCount = DataConnection!.CurrencyManager?.List.Count ?? 0; 19984DataConnection!.DeleteRow(rowIndex); 25431AutoGenerateDataBoundColumns(DataConnection?.GetCollectionOfBoundDataGridViewColumns()); 25452DataConnection!.ApplySortingInformationFromBackEnd(); 25531if (DataConnection is not null && Columns.Count > 0) 25533IList? list = DataConnection.List; 25537bool oldDoNotChangePositionInTheCurrencyManager = DataConnection.DoNotChangePositionInTheCurrencyManager; 25547DataConnection.DoNotChangePositionInTheCurrencyManager = true; 25570DataConnection.DoNotChangePositionInTheCurrencyManager = oldDoNotChangePositionInTheCurrencyManager; 25575DataConnection.MatchCurrencyManagerPosition(scrollIntoView, clearSelection: true); 26769(DataConnection is null || !DataConnection.ProcessingListChangedEvent)) // underlying data changing. 28198if (DataConnection?.List is not IBindingList ibl) 28285DataConnection!.Sort(dataGridViewColumn!, direction);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
1552&& DataGridView.DataConnection is not null) 1554errorText = DataGridView.DataConnection.GetError(OwningColumn.BoundColumnIndex, ColumnIndex, rowIndex); 2436DataGridView.DataGridViewDataConnection? dataConnection = dataGridView.DataConnection; 3888DataGridView.DataGridViewDataConnection? dataConnection = dataGridView.DataConnection;
System\Windows\Forms\Controls\DataGridView\DataGridViewColumn.cs (2)
676DataGridView.DataConnection is not null && 678DataGridView.DataConnection.DataFieldIsReadOnly(BoundColumnIndex) &&
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.cs (4)
71&& DataGridView.DataConnection is not null 72&& DataGridView.DataConnection.CurrencyManager is not null 76return DataGridView.DataConnection.CurrencyManager[Index]; 1248errorText = DataGridView.DataConnection!.GetError(rowIndex);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowCollection.cs (2)
794if (DataGridView.DataConnection!.List is IBindingList list && list.AllowRemove && list.SupportsChangeNotification) 2192if (DataGridView.DataConnection!.List is IBindingList bindingList && bindingList.AllowRemove && bindingList.SupportsChangeNotification)