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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DateTimeOffset Property Databinding

Thread ID:





121703 Jan 18,2016 12:34 PM UTC Jan 20,2016 04:33 AM UTC ASP.NET MVC 3
Tags: Grid
Asked On January 18, 2016 12:34 PM UTC

Hi there,

In a project I am working on there are classes with DateTimeOffset properties which needs to be displayed on controls like Grid and DateTimePicker etc.

I have noticed that when I am editing the columns bound to these properties data seems to be not displaying and while saving data is not displaying the new value on the column.  However I can see the data is actually changed and able to see the change via BatchUpdate method.

I have attached couple of screen shots along with this thread with Pre and Post user change of the field.

Is there a way to display DateTimeOffset field as corresponding local date/time while also able to display the updated value within the column.

Are there any issues with DateTimeOffset properties being bound to other MVC controls?

Also what is the best way to display DateTime/DateTimeOffset in local format (e.g. 31/12/2001 but not 12/31/2001)


Attachment: Grid_DateTimeOffset_Column_c239ea20.zip

Prasanna Kumar Viswanathan [Syncfusion]
Replied On January 19, 2016 11:40 AM UTC

Hi Prasanth,

Thanks for contacting Syncfusion support.

“While editing the columns proper data not displaying”

We have created a sample in batch editing with DateTimeOffset properties and we are able to display proper data while editing the columns.

public DateTimeOffset? OrderDate




Please find the screenshots:


After Editing:


“While saving the data the new date is not displayed”

While saving the data, we are able to get the new date in the date column.

Please find the screenshot:


“To display the datetime in local format”

To mention the datetime in local format, we suggest you to use Format API in the columns of ejGrid.

Please find the code example:

col.Field("OrderDate").HeaderText("Order Date").TextAlign(TextAlign.Right).Width(80).Format("{0:MM/dd/yyyy hh:mm:ss}").EditType(EditingType.DateTimePicker).Add();

Refer the below link for the various types of formats

Link : http://mvc.syncfusion.com/demos/web/grid/columnformatting

Sample: http://www.syncfusion.com/downloads/support/forum/121703/ze/Sample1105674821

Please provide the following details it will help us to reproduce the mentioned issue.

1.       Share the code example.

2.       Share the screenshot of an issue, if you face any script errors while editing the columns.

3.       Essential Studio version details.

Prasanna Kumar N.S.V

Replied On January 19, 2016 12:37 PM UTC

Hi Prasanna,

Thanks for the source code.  The issues seems to be related to format not being specified.  Soon as I added the foll0wing the issues I have mentioned disappeared.

.Format("{0:dd/MM/yyyy hh:mm:ss}")

Previously I didn't specify any formatting details.  Thanks again


Prasanna Kumar Viswanathan [Syncfusion]
Replied On January 20, 2016 04:33 AM UTC

Hi Prasanth,
We are happy that the provided solution working fine at your end. 

Prasanna Kumar N.S.V


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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