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