Home Forums WinForms controls Xceed Grid for WinForms Date value of 0001-01-01 displays as Null Reply To: Date value of 0001-01-01 displays as Null

Xceed Support
Member
Post count: 5658

Hi Phil,

You can set the NullText value on the Column so that it will reflect the minimum value. In the following code, the column will display your desired output.

———-

            DateTime dt = new DateTime();
            dt.AddDays(1d);
            dt.AddMonths(1);
            dt.AddYears(1); 

            this.gridControl1.BeginInit();
           
            this.gridControl1.Columns[“Column7”].NullText = dt.ToString();

            this.gridControl1.EndInit();

———-

Imported from legacy forums. Posted by Marc [Xceed] (had 1225 views)