0

view to bind data from Data-source and displaying the data in ultrawingrid when the date field is having System.DateTime.MaxValue I need to set a null or empty value in it. I was unable to set it.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
chaitanya Phani
  • 1
  • 1
  • 1
  • 1

1 Answers1

1

You can't set DateTime to null. It's value type but not reference type. Like structures, int, double, etc. You can use Nullable<DateTime> (the same = DateTime? ). Or instantiate it with default value var someDateTime = default(DateTime);

Liam
  • 27,717
  • 28
  • 128
  • 190