1 write to _dataGridView
System.Windows.Forms.Tests (1)
System\Windows\Forms\DataGridViewTests.cs (1)
24_dataGridView = new();
269 references to _dataGridView
System.Windows.Forms.Tests (269)
System\Windows\Forms\DataGridViewTests.cs (269)
27public void Dispose() => _dataGridView.Dispose(); 2943sender.Should().Be(_dataGridView); 2948_dataGridView.AllowUserToAddRowsChanged += handler; 2949_dataGridView.AllowUserToAddRows = !_dataGridView.AllowUserToAddRows; 2952_dataGridView.AllowUserToAddRowsChanged -= handler; 2953_dataGridView.AllowUserToAddRows = !_dataGridView.AllowUserToAddRows; 2963sender.Should().Be(_dataGridView); 2968_dataGridView.AllowUserToDeleteRowsChanged += handler; 2969_dataGridView.AllowUserToDeleteRows = !_dataGridView.AllowUserToDeleteRows; 2972_dataGridView.AllowUserToDeleteRowsChanged -= handler; 2973_dataGridView.AllowUserToDeleteRows = !_dataGridView.AllowUserToDeleteRows; 2983sender.Should().Be(_dataGridView); 2988_dataGridView.AllowUserToOrderColumnsChanged += handler; 2989_dataGridView.AllowUserToOrderColumns = !_dataGridView.AllowUserToOrderColumns; 2992_dataGridView.AllowUserToOrderColumnsChanged -= handler; 2993_dataGridView.AllowUserToOrderColumns = !_dataGridView.AllowUserToOrderColumns; 3003sender.Should().Be(_dataGridView); 3008_dataGridView.AllowUserToResizeColumnsChanged += handler; 3009_dataGridView.AllowUserToResizeColumns = !_dataGridView.AllowUserToResizeColumns; 3012_dataGridView.AllowUserToResizeColumnsChanged -= handler; 3013_dataGridView.AllowUserToResizeColumns = !_dataGridView.AllowUserToResizeColumns; 3023sender.Should().Be(_dataGridView); 3028_dataGridView.AllowUserToResizeRowsChanged += handler; 3029_dataGridView.AllowUserToResizeRows = !_dataGridView.AllowUserToResizeRows; 3032_dataGridView.AllowUserToResizeRowsChanged -= handler; 3033_dataGridView.AllowUserToResizeRows = !_dataGridView.AllowUserToResizeRows; 3043sender.Should().Be(_dataGridView); 3048_dataGridView.AlternatingRowsDefaultCellStyleChanged += handler; 3049_dataGridView.AlternatingRowsDefaultCellStyle = new() { BackColor = Color.AliceBlue }; 3052_dataGridView.AlternatingRowsDefaultCellStyleChanged -= handler; 3053_dataGridView.AlternatingRowsDefaultCellStyle = new(); 3063sender.Should().Be(_dataGridView); 3068_dataGridView.AutoGenerateColumnsChanged += handler; 3069_dataGridView.AutoGenerateColumns = !_dataGridView.AutoGenerateColumns; 3072_dataGridView.AutoGenerateColumnsChanged -= handler; 3073_dataGridView.AutoGenerateColumns = !_dataGridView.AutoGenerateColumns; 3083sender.Should().Be(_dataGridView); 3088_dataGridView.BackgroundColorChanged += handler; 3089_dataGridView.BackgroundColor = Color.AliceBlue; 3092_dataGridView.BackgroundColorChanged -= handler; 3093_dataGridView.BackgroundColor = Color.Azure; 3103sender.Should().Be(_dataGridView); 3108_dataGridView.BorderStyleChanged += handler; 3109_dataGridView.BorderStyle = BorderStyle.Fixed3D; 3112_dataGridView.BorderStyleChanged -= handler; 3113_dataGridView.BorderStyle = BorderStyle.FixedSingle; 3123sender.Should().Be(_dataGridView); 3128_dataGridView.CellBorderStyleChanged += handler; 3129_dataGridView.CellBorderStyle = DataGridViewCellBorderStyle.SingleVertical; 3132_dataGridView.CellBorderStyleChanged -= handler; 3133_dataGridView.CellBorderStyle = DataGridViewCellBorderStyle.Single; 3143sender.Should().Be(_dataGridView); 3148_dataGridView.ColumnHeadersBorderStyleChanged += handler; 3149_dataGridView.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single; 3152_dataGridView.ColumnHeadersBorderStyleChanged -= handler; 3153_dataGridView.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.Raised; 3163sender.Should().Be(_dataGridView); 3168_dataGridView.ColumnHeadersDefaultCellStyleChanged += handler; 3169_dataGridView.ColumnHeadersDefaultCellStyle = new() { BackColor = Color.Red }; 3172_dataGridView.ColumnHeadersDefaultCellStyleChanged -= handler; 3173_dataGridView.ColumnHeadersDefaultCellStyle = new(); 3183sender.Should().Be(_dataGridView); 3188_dataGridView.DataMemberChanged += handler; 3189_dataGridView.DataMember = "TestMember"; 3192_dataGridView.DataMemberChanged -= handler; 3193_dataGridView.DataMember = "AnotherTestMember"; 3203sender.Should().Be(_dataGridView); 3208_dataGridView.DataSourceChanged += handler; 3209_dataGridView.DataSource = new(); 3212_dataGridView.DataSourceChanged -= handler; 3213_dataGridView.DataSource = new(); 3223sender.Should().Be(_dataGridView); 3228_dataGridView.DefaultCellStyleChanged += handler; 3229_dataGridView.DefaultCellStyle = new() { BackColor = Color.Red }; 3232_dataGridView.DefaultCellStyleChanged -= handler; 3233_dataGridView.DefaultCellStyle = new(); 3243sender.Should().Be(_dataGridView); 3248_dataGridView.EditModeChanged += handler; 3249_dataGridView.EditMode = DataGridViewEditMode.EditOnEnter; 3252_dataGridView.EditModeChanged -= handler; 3253_dataGridView.EditMode = DataGridViewEditMode.EditOnKeystroke; 3263sender.Should().Be(_dataGridView); 3268_dataGridView.GridColorChanged += handler; 3269_dataGridView.GridColor = Color.Red; 3272_dataGridView.GridColorChanged -= handler; 3273_dataGridView.GridColor = Color.Blue; 3283sender.Should().Be(_dataGridView); 3288_dataGridView.MultiSelectChanged += handler; 3289_dataGridView.MultiSelect = false; 3292_dataGridView.MultiSelectChanged -= handler; 3293_dataGridView.MultiSelect = true; 3303sender.Should().Be(_dataGridView); 3308_dataGridView.ReadOnlyChanged += handler; 3309_dataGridView.ReadOnly = true; 3312_dataGridView.ReadOnlyChanged -= handler; 3313_dataGridView.ReadOnly = false; 3323sender.Should().Be(_dataGridView); 3328_dataGridView.RowHeadersBorderStyleChanged += handler; 3329_dataGridView.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.Single; 3332_dataGridView.RowHeadersBorderStyleChanged -= handler; 3333_dataGridView.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.Raised; 3343sender.Should().Be(_dataGridView); 3348_dataGridView.RowHeadersDefaultCellStyleChanged += handler; 3349_dataGridView.RowHeadersDefaultCellStyle = new(); 3352_dataGridView.RowHeadersDefaultCellStyleChanged -= handler; 3353_dataGridView.RowHeadersDefaultCellStyle = new(); 3363sender.Should().Be(_dataGridView); 3368_dataGridView.RowsDefaultCellStyleChanged += handler; 3369_dataGridView.RowsDefaultCellStyle = new() { BackColor = Color.Red }; 3372_dataGridView.RowsDefaultCellStyleChanged -= handler; 3373_dataGridView.RowsDefaultCellStyle = new(); 3383sender.Should().Be(_dataGridView); 3388_dataGridView.Columns.Add("Column1", "Column1"); 3389_dataGridView.Rows.Add(); 3390_dataGridView.Rows.Add(); 3392_dataGridView.CurrentCellChanged += handler; 3393_dataGridView.CurrentCell = _dataGridView[0, 0]; 3396_dataGridView.CurrentCellChanged -= handler; 3397_dataGridView.CurrentCell = _dataGridView[0, 1]; 3407sender.Should().Be(_dataGridView); 3412_dataGridView.Columns.Add("Column1", "Column1"); 3413_dataGridView.Rows.Add(); 3414_dataGridView.Rows.Add(); 3416_dataGridView.CurrentCellDirtyStateChanged += handler; 3417_dataGridView.CurrentCell = _dataGridView[0, 0]; 3418_dataGridView[0, 0].Value = true; 3419_dataGridView.NotifyCurrentCellDirty(true); 3422_dataGridView.CurrentCellDirtyStateChanged -= handler; 3423_dataGridView.CurrentCell = _dataGridView[0, 1]; 3424_dataGridView[0, 1].Value = true; 3425_dataGridView.NotifyCurrentCellDirty(true); 3435sender.Should().Be(_dataGridView); 3440_dataGridView.Columns.Add("Column1", "Column1"); 3441_dataGridView.Rows.Add(); 3442_dataGridView.Rows.Add(); 3444_dataGridView.SelectionChanged += handler; 3445_dataGridView.ClearSelection(); 3446_dataGridView.Rows[0].Selected = true; 3449_dataGridView.SelectionChanged -= handler; 3450_dataGridView.ClearSelection(); 3451_dataGridView.Rows[1].Selected = true; 3461sender.Should().Be(_dataGridView); 3466_dataGridView.Columns.Add("Column1", "Column1"); 3467_dataGridView.Rows.Add("B"); 3468_dataGridView.Rows.Add("A"); 3470_dataGridView.Sorted += handler; 3471_dataGridView.Sort(_dataGridView.Columns[0], ListSortDirection.Ascending); 3474_dataGridView.Sorted -= handler; 3475_dataGridView.Sort(_dataGridView.Columns[0], ListSortDirection.Descending); 3537sender.Should().Be(_dataGridView); 3545eventInfo.AddEventHandler(_dataGridView, handler); 3546propertyInfo.SetValue(_dataGridView, propertyValue, null); 3549eventInfo.RemoveEventHandler(_dataGridView, handler); 3550propertyInfo.SetValue(_dataGridView, newPropertyValue, null); 3560sender.Should().Be(_dataGridView); 3565_dataGridView.AutoSizeColumnsModeChanged += handler; 3566_dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; 3569_dataGridView.AutoSizeColumnsModeChanged -= handler; 3570_dataGridView.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; 3580sender.Should().Be(_dataGridView); 3585_dataGridView.AutoSizeRowsModeChanged += handler; 3586_dataGridView.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells; 3589_dataGridView.AutoSizeRowsModeChanged -= handler; 3590_dataGridView.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.DisplayedCells; 3627sender.Should().Be(_dataGridView); 3632_dataGridView.Columns.Add("Column1", "Column1"); 3633_dataGridView.Rows.Add("A"); 3634_dataGridView.Rows.Add("B"); 3636_dataGridView.CellEndEdit += handler; 3637_dataGridView.CurrentCell = _dataGridView[0, 0]; 3638_dataGridView.BeginEdit(false); 3639_dataGridView.EndEdit(); 3642_dataGridView.CellEndEdit -= handler; 3643_dataGridView.CurrentCell = _dataGridView[0, 1]; 3644_dataGridView.BeginEdit(false); 3645_dataGridView.EndEdit(); 3655sender.Should().Be(_dataGridView); 3660_dataGridView.Columns.Add("Column1", "Column1"); 3661_dataGridView.Rows.Add("A"); 3662_dataGridView.Rows.Add("B"); 3664_dataGridView.CellEnter += handler; 3665_dataGridView.CurrentCell = _dataGridView[0, 0]; 3668_dataGridView.CellEnter -= handler; 3669_dataGridView.CurrentCell = _dataGridView[0, 1]; 3865sender.Should().Be(_dataGridView); 3870_dataGridView.Columns.Add("Column1", "Column1"); 3871_dataGridView.Columns.Add("Column2", "Column2"); 3873_dataGridView.ColumnHeaderCellChanged += handler; 3874_dataGridView.Columns[0].HeaderCell = new(); 3877_dataGridView.ColumnHeaderCellChanged -= handler; 3878_dataGridView.Columns[1].HeaderCell = new(); 3888sender.Should().Be(_dataGridView); 3893_dataGridView.Columns.Add("Column1", "Column1"); 3895_dataGridView.ColumnMinimumWidthChanged += handler; 3896_dataGridView.Columns[0].MinimumWidth = 50; 3899_dataGridView.ColumnMinimumWidthChanged -= handler; 3900_dataGridView.Columns[0].MinimumWidth = 100; 3910sender.Should().Be(_dataGridView); 3915_dataGridView.Columns.Add("Column1", "Column1"); 3917_dataGridView.ColumnNameChanged += handler; 3918_dataGridView.Columns[0].Name = "TestName1"; 3921_dataGridView.ColumnNameChanged -= handler; 3922_dataGridView.Columns[0].Name = "TestName2"; 3932sender.Should().Be(_dataGridView); 3937_dataGridView.Columns.Add("Column1", "Column1"); 3938_dataGridView.Columns.Add("Column2", "Column2"); 3940_dataGridView.ColumnRemoved += handler; 3941_dataGridView.Columns.Remove("Column2"); 3944_dataGridView.ColumnRemoved -= handler; 3945_dataGridView.Columns.Remove("Column1"); 3955sender.Should().Be(_dataGridView); 3960_dataGridView.Columns.Add("Column1", "Column1"); 3962_dataGridView.ColumnSortModeChanged += handler; 3963_dataGridView.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable; 3966_dataGridView.ColumnSortModeChanged -= handler; 3967_dataGridView.Columns[0].SortMode = DataGridViewColumnSortMode.Automatic; 3977sender.Should().Be(_dataGridView); 3982_dataGridView.Columns.Add("Column1", "Column1"); 3984_dataGridView.ColumnToolTipTextChanged += handler; 3985_dataGridView.Columns[0].ToolTipText = "ToolTip Text"; 3988_dataGridView.ColumnToolTipTextChanged -= handler; 3989_dataGridView.Columns[0].ToolTipText = "New ToolTip Text"; 3999sender.Should().Be(_dataGridView); 4004_dataGridView.Columns.Add("Column1", "Column1"); 4006_dataGridView.ColumnWidthChanged += handler; 4007_dataGridView.Columns[0].Width = 50; 4010_dataGridView.ColumnWidthChanged -= handler; 4011_dataGridView.Columns[0].Width = 100; 4021sender.Should().Be(_dataGridView); 4039_dataGridView.DataBindingComplete += handler; 4040_dataGridView.BindingContext = context1; 4041_dataGridView.DataSource = bindingSource1; 4044_dataGridView.DataBindingComplete -= handler; 4045_dataGridView.BindingContext = context2; 4046_dataGridView.DataSource = bindingSource2; 4056sender.Should().Be(_dataGridView); 4061_dataGridView.Columns.Add("Column1", "Column 1"); 4062_dataGridView.Columns.Add("Column2", "Column 2"); 4063_dataGridView.AllowUserToAddRows = true; 4065_dataGridView.DefaultValuesNeeded += handler; 4066_dataGridView.CurrentCell = _dataGridView.Rows[_dataGridView.NewRowIndex].Cells[0]; 4069_dataGridView.DefaultValuesNeeded -= handler; 4070_dataGridView.CurrentCell = _dataGridView.Rows[_dataGridView.NewRowIndex].Cells[1];