67 references to Formatting
System.Windows.Forms (31)
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (3)
9688_uneditedFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 9693object? currentFormattedValue = dataGridViewEditingCell.GetEditingCellFormattedValue(DataGridViewDataErrorContexts.Formatting); 9729object? initialFormattedValue = dataGridViewCell.GetFormattedValue(_ptCurrentCell.Y, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting);
System\Windows\Forms\Controls\DataGridView\DataGridViewButtonCell.cs (3)
193DataGridViewDataErrorContexts.Formatting), 265DataGridViewDataErrorContexts.Formatting), 298string? formattedString = GetFormattedValue(rowIndex, ref cellStyle, DataGridViewDataErrorContexts.Formatting | DataGridViewDataErrorContexts.PreferredSize) as string;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (4)
184return GetEditedFormattedValue(GetValue(RowIndex), RowIndex, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 230return GetFormattedValue(RowIndex, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting); 1311formattedValue = GetEditedFormattedValue(GetValue(rowIndex), rowIndex, ref dataGridViewCellStyle, DataGridViewDataErrorContexts.Formatting | DataGridViewDataErrorContexts.ClipboardContent); 3650DataGridViewDataErrorContexts.Formatting | DataGridViewDataErrorContexts.Display);
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (1)
246DataGridViewDataErrorContexts.Formatting);
System\Windows\Forms\Controls\DataGridView\DataGridViewCheckBoxCell.cs (3)
54get => GetEditingCellFormattedValue(DataGridViewDataErrorContexts.Formatting); 482GetEditedFormattedValue(value, rowIndex, ref cellStyle, DataGridViewDataErrorContexts.Formatting), 1684editingCell.EditingCellFormattedValue = !((bool)editingCell.GetEditingCellFormattedValue(DataGridViewDataErrorContexts.Formatting)!);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (4)
742DataGridViewDataErrorContexts.Formatting); 852DataGridViewDataErrorContexts.Formatting); 1182string? formattedValue = GetFormattedValue(rowIndex, ref cellStyle, DataGridViewDataErrorContexts.Formatting | DataGridViewDataErrorContexts.PreferredSize) as string; 1249DataGridViewDataErrorContexts.Formatting);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.cs (1)
42get => GetEditingControlFormattedValue(DataGridViewDataErrorContexts.Formatting);
System\Windows\Forms\Controls\DataGridView\DataGridViewImageCell.cs (3)
241DataGridViewDataErrorContexts.Formatting); 307DataGridViewDataErrorContexts.Formatting); 413object? formattedValue = GetFormattedValue(rowIndex, ref cellStyle, DataGridViewDataErrorContexts.Formatting | DataGridViewDataErrorContexts.PreferredSize);
System\Windows\Forms\Controls\DataGridView\DataGridViewLinkCell.cs (3)
436DataGridViewDataErrorContexts.Formatting); 510DataGridViewDataErrorContexts.Formatting); 554object? formattedValue = GetFormattedValue(rowIndex, ref cellStyle, DataGridViewDataErrorContexts.Formatting | DataGridViewDataErrorContexts.PreferredSize);
System\Windows\Forms\Controls\DataGridView\DataGridViewRowHeaderCell.cs (1)
267DataGridViewDataErrorContexts.Formatting);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxCell.cs (4)
218string editedFormattedValue = (string)((IDataGridViewEditingControl)txtEditingControl).GetEditingControlFormattedValue(DataGridViewDataErrorContexts.Formatting); 272DataGridViewDataErrorContexts.Formatting); 367DataGridViewDataErrorContexts.Formatting); 406object? formattedValue = GetFormattedValue(rowIndex, ref cellStyle, DataGridViewDataErrorContexts.Formatting | DataGridViewDataErrorContexts.PreferredSize);
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.cs (1)
48return GetEditingControlFormattedValue(DataGridViewDataErrorContexts.Formatting);
System.Windows.Forms.Tests (36)
System\Windows\Forms\DataGridViewCellTests.cs (26)
3683[InlineData(-2, DataGridViewDataErrorContexts.Formatting)] 3684[InlineData(-1, DataGridViewDataErrorContexts.Formatting)] 3685[InlineData(0, DataGridViewDataErrorContexts.Formatting)] 3686[InlineData(1, DataGridViewDataErrorContexts.Formatting)] 3694[InlineData(-2, DataGridViewDataErrorContexts.Formatting)] 3695[InlineData(-1, DataGridViewDataErrorContexts.Formatting)] 3696[InlineData(0, DataGridViewDataErrorContexts.Formatting)] 3697[InlineData(1, DataGridViewDataErrorContexts.Formatting)] 3708[InlineData(-2, DataGridViewDataErrorContexts.Formatting)] 3709[InlineData(-1, DataGridViewDataErrorContexts.Formatting)] 3710[InlineData(0, DataGridViewDataErrorContexts.Formatting)] 3711[InlineData(1, DataGridViewDataErrorContexts.Formatting)] 3721[InlineData(-2, DataGridViewDataErrorContexts.Formatting)] 3722[InlineData(-1, DataGridViewDataErrorContexts.Formatting)] 3723[InlineData(0, DataGridViewDataErrorContexts.Formatting)] 3724[InlineData(1, DataGridViewDataErrorContexts.Formatting)] 3734[InlineData(DataGridViewDataErrorContexts.Formatting)] 3751[InlineData(DataGridViewDataErrorContexts.Formatting)] 3769[InlineData(DataGridViewDataErrorContexts.Formatting)] 3801Assert.Throws<ArgumentOutOfRangeException>("rowIndex", () => cell.GetEditedFormattedValue(rowIndex, DataGridViewDataErrorContexts.Formatting)); 4136yield return new object[] { "value", -2, new DataGridViewCellStyle(), new Int32Converter(), new Int32Converter(), DataGridViewDataErrorContexts.Formatting, null }; 4137yield return new object[] { "value", -1, new DataGridViewCellStyle(), new Int32Converter(), new Int32Converter(), DataGridViewDataErrorContexts.Formatting, null }; 4138yield return new object[] { "value", 0, new DataGridViewCellStyle(), new Int32Converter(), new Int32Converter(), DataGridViewDataErrorContexts.Formatting, null }; 4139yield return new object[] { null, -2, null, null, null, DataGridViewDataErrorContexts.Formatting - 1, null }; 4140yield return new object[] { null, -1, null, null, null, DataGridViewDataErrorContexts.Formatting - 1, null }; 4141yield return new object[] { null, 0, null, null, null, DataGridViewDataErrorContexts.Formatting - 1, null };
System\Windows\Forms\DataGridViewDataErrorEventArgsTests.cs (7)
12yield return new object[] { new InvalidOperationException(), 0, 0, DataGridViewDataErrorContexts.Formatting }; 13yield return new object[] { new InvalidOperationException(), 1, 2, DataGridViewDataErrorContexts.Formatting }; 32Assert.Throws<ArgumentOutOfRangeException>("columnIndex", () => new DataGridViewDataErrorEventArgs(null, -2, 0, DataGridViewDataErrorContexts.Formatting)); 38Assert.Throws<ArgumentOutOfRangeException>("rowIndex", () => new DataGridViewDataErrorEventArgs(null, 0, -2, DataGridViewDataErrorContexts.Formatting)); 46DataGridViewDataErrorEventArgs e = new(new InvalidOperationException(), 1, 2, DataGridViewDataErrorContexts.Formatting) { ThrowException = value }; 53DataGridViewDataErrorEventArgs e = new(null, 1, 2, DataGridViewDataErrorContexts.Formatting) { ThrowException = false }; 60DataGridViewDataErrorEventArgs e = new(null, 1, 2, DataGridViewDataErrorContexts.Formatting);
System\Windows\Forms\DataGridViewElementTests.cs (2)
254yield return new object[] { new DataGridViewDataErrorEventArgs(new InvalidOperationException(), 1, 2, DataGridViewDataErrorContexts.Formatting) }; 268DataGridViewDataErrorEventArgs eventArgs = new(new InvalidOperationException(), 1, 2, DataGridViewDataErrorContexts.Formatting);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (1)
185Assert.Equal(DataGridViewDataErrorContexts.Formatting, context);