79401483

Date: 2025-01-30 23:44:08
Score: 1
Natty:
Report link

For my application, it was simplest for me to simply apply the "?" nullable-value-type modifier to the properties of the class being used in my Data Grid, and this resolved the issue. This way, the user could enter an "empty" value for an integer - without the grid griping about it. (I have my own custom fluent validation for all of my classes).

public class Machine
{
    public string? Name { get; set; }
    public string? IPAddress { get; set; }
    public int? Port { get; set; }
}
Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: TRexF14