This is a migrated thread and some comments may be shown as answers.

[Solved] Grid Nullable Date format & localization

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ofer
Top achievements
Rank 1
Ofer asked on 12 Sep 2011, 11:23 AM
Hi,
I'm using your grid with ajax binding.
The relevant column is of Type "DateTime?", and i want to format it like local browser format
All my DB times are in UTC and i'd like the grid to present it in browser local time but it shows the date time in UTC like in the DB.

THNX

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 14 Sep 2011, 11:23 AM
Hello Alon,

Generally speaking, if you are using Ajax binding, the date should be generated with the browser local time's offset - the data coming from the server is serialized by .NET's JavaScriptSerializer and then deserialized on the client. During that process, the date is created by using JavaScript's Date() object that always uses the time zone when parsing the date.
This being said, I am not quite sure what the problem might be in your scenario, but if you send us a sample project that reproduces the problem, we will check it and get back to you with a solution.


Greetings,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Ofer
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or