We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to set null in GridDateTimeColumn

I have set the date in the GridDateTimeColumns pool to change this value to null. Validation set to "none", the field set "AllowNull = true".

I am sorry to translate from Polish to English on Google

1 Reply

DY Deivaselvan Y Syncfusion Team November 27, 2018 08:47 AM UTC

Hi Mariusz, 
Thanks for contacting Syncfusion support.  

To set null value for a GridDateTimeColumn the underlying property of the DateTimeColumn must be of nullable DateTime type. Please refer to the following code example and sample from the given location.  

Code example :  

/// <summary> 
/// Gets or Sets the OrderDate 
/// </summary> 
[Display(Name = "Order Date")] 
public DateTime? OrderDate 
        return _orderDate; 
        _orderDate = value; 

You can set null value for a DateTimeColumn by opening the calendar dropdown and select None option from the bottom of the calendar. 



Live Chat Icon For mobile
Up arrow icon