31 references to policy
System.Windows.Forms (31)
winforms\Managed\System\WinForms\DataGrid.cs (31)
1051if (currentRow == dataGridRowsLength - 1 && policy.AllowAdd) { 1361if (policy.AllowAdd) 1369if (policy.AllowAdd) { 1386if (policy.AllowAdd) { 1608policy.UpdatePolicy(this.listManager, this.ReadOnly); 2752recreateRows = policy.AllowAdd; 2754policy.AllowRemove = false; 2755policy.AllowEdit = false; 2756policy.AllowAdd = false; 2759recreateRows |= policy.UpdatePolicy(this.listManager, value); 3117policy.UpdatePolicy(this.ListManager, this.ReadOnly); 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]) { 4168if (policy.AllowEdit && CurrentCell.Equals(target)) { 5720dgs.DataGridRowsLength = childLM.Count + (policy.AllowAdd ? 1 : 0); 5946myGridTable.ReadOnly || this.ReadOnly || !policy.AllowEdit, 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), 8078if (policy.AllowRemove && numSelectedRows > 0) { 8111CurrentRow = Math.Max(0, DataGridRowsLength - (policy.AllowAdd ? 2:1)); 8165numSelectedRows = DataGridRowsLength - (policy.AllowAdd ? 1 : 0); 8907if (row < -1 || row > DataGridRowsLength - (policy.AllowAdd ? 2:1)) {