I would like to display date in locale date format, how do I do it? I tried using format, but it doesn't work? is there easy way to do it?
$("#grid1").igGrid({
autoGenerateColumns: false,
columns: [
{ headerText: "ID", key: "ID", dataType: "number" },
{ headerText: "Name", key: "Name", dataType: "string" },
{ headerText: "DOB", key: "DOB", dataType: "dateTime" },
],
dataSource: adventureWorks,
responseDataKey: 'Records',
});
Json:
Hi, You can refer to my reply to this meail thread:
http://community.infragistics.com/forums/p/67393/345768.aspx#345768
In order to get regional formatting for dates and some number formats (format: 'currency' for example) you will need to reference the respective regional JS file like I've pointed out in the link.Please take a look and let us know if doesn't work out for you. Cheers,Borislav
Thanks for the quick reply, that worked.. but I have another problem now, date shown in the grid is always 1 day before. e.g. it grid shows date "2/7/2010" but actual value in jason data is "2010-02-08", I am not sure how to specify input Data Format, or is there another standard way to get dates from server?
Please let me know if you have any suggestions.
Thanks
Hi,Yes, there is a bug in the way dates are deserialized by the igGrid.This has been fixed so you will be able to get the fix in the upcoming Service Release for 2011.1 and 2011.2 this May.
Let me know if you encounter any other problems.Cheers,Borislav