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