2 writes to AllowAdd
System.Windows.Forms (2)
winforms\Managed\System\WinForms\DataGrid.cs (2)
2756policy.AllowAdd = false; 9508AllowAdd= listManager.AllowAdd && !gridReadOnly && bl != null && bl.SupportsChangeNotification;
23 references to AllowAdd
System.Windows.Forms (23)
winforms\Managed\System\WinForms\DataGrid.cs (23)
1051if (currentRow == dataGridRowsLength - 1 && policy.AllowAdd) { 1361if (policy.AllowAdd) 1369if (policy.AllowAdd) { 1386if (policy.AllowAdd) { 2752recreateRows = policy.AllowAdd; 3122Debug.Assert(policy.AllowAdd, "how can we add a new row if the policy does not allow this?"); 3239if (this.DataGridRowsLength > this.listManager.Count + (policy.AllowAdd?1:0) && !gridState[GRIDSTATE_inDeleteRow]) { 5720dgs.DataGridRowsLength = childLM.Count + (policy.AllowAdd ? 1 : 0); 6271if (policy.AllowAdd) 6898if ((this.ReadOnly || !policy.AllowAdd) == (localGridRows[DataGridRowsLength -1] is DataGridAddNewRow)) { 6899int newDataGridRowsLength = (ReadOnly || !policy.AllowAdd) ? DataGridRowsLength - 1 : DataGridRowsLength + 1; 6904if(!this.ReadOnly && policy.AllowAdd) 6974if (rowNumber < 0 || rowNumber > DataGridRowsLength - (policy.AllowAdd ? 2:1)) { 7789CurrentRow = Math.Max(0, DataGridRowsLength - (policy.AllowAdd ? 2:1)); 7806CurrentRow = Math.Max(0, DataGridRowsLength - (policy.AllowAdd ? 2 : 1)); 7818if (currentRow < DataGridRowsLength - (policy.AllowAdd ? 1:0) - 1) { 7836if (currentRow < DataGridRowsLength - (policy.AllowAdd ? 1:0) - 1) { 7908CurrentRow = Math.Min(DataGridRowsLength - (policy.AllowAdd ? 2:1), currentRow + numTotallyVisibleRows); 7929CurrentRow = Math.Min(DataGridRowsLength - (policy.AllowAdd ? 2:1), 8111CurrentRow = Math.Max(0, DataGridRowsLength - (policy.AllowAdd ? 2:1)); 8165numSelectedRows = DataGridRowsLength - (policy.AllowAdd ? 1 : 0); 8907if (row < -1 || row > DataGridRowsLength - (policy.AllowAdd ? 2:1)) { 9506if (AllowAdd != listManager.AllowAdd && !gridReadOnly)