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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to load null value to the GridDateTimeColumn when AllowInlineEditing is set to true?

The SfDatePicker is loaded as UIElement of the GridDateTimeColumn in edit mode. By default, old value is replaced when you try to commit the blank value on editing and when the SfDatePicker.AllowInlineEditing property is enabled.

You can overcome this by deriving a new class from the GridCellDateTimeRenderer and overriding the OnEditElementLoaded virtual method. In this method, you can get the corresponding editor, SfDatePicker of the GridDateTimeColumn and you can explicitly set the SfDatePicker.Value as null in SfTextBoxExt.TextChanged event.

Note: The SfTextBoxExt is loaded as editor of the SfDatePicker control.

C#

Note: In the above code example, FindDescendantByName is an extension helper method available in a attached sample.

Refer to the following code example to remove the default GridCellDateTimeRenderer and add the customized GridCellDateTimeRendererExt to the SfDataGrid.CellRenderer collection.

C#

Sample Links:

WinRT: http://www.syncfusion.com/downloads/support/directtrac/141421/ze/WinRT2074283480

WP: http://www.syncfusion.com/downloads/support/directtrac/141421/ze/WindowsPhone-1688298690

Article ID: Published Date: Last Revised Date: Platform: Control: .NET Framework:
5338 08/11/2015 08/11/2015 Windows Phone SfDataGrid 4.5
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon