Hi Pratura,
Thanks for the update.
Query #1:”Since i'm using local Datasource i have to deserialize it to map it to the class.Then all date fields get one hour subtracted from the actual date in the grid.Datasource value because we're in the -1 UTC zone.Do you know how to correct this?”
This is already known issue, suppose application has been hosted in EST time zone and client may be in IST,GMT etc. In that case, date will differ from data base. Please refer to the following Help documentation and Code example for more information,
|
<script type="text/javascript">
. . .
var serverTimeZoneDiff = -4.0 // if your server is in EDT time zone (UTC -4.0) (in hours)
var clientSideTimeZoneDiff = new Date().getTimezoneOffset() / 60; // get client time zone difference and convert it to hours;
ej.serverTimezoneOffset = serverTimeZoneDiff + clientSideTimeZoneDiff;
. . .
</script> |
Query #2:” Is is possible to export the date field without the time?”
Normally, the Grid export the date column based on the format which is mentioned in the columns property. So, if the date format is “{0:dd/MM/YYYY}” then exported date cell also same format. Because, we have performed the Export action based on the Grid model. If you still face the same issue, then could you please provide following details?
1) Share the JSON details of the first record in Grid.
2) Share the Grid code example.
3) Controller side code example of Export.
4) A sample if possible.
Query #3:” Is it possible to set the width of every column the size of the content”
We suspect that do you want to set the column width based on the content of the cell. If so, we have built-in support of allowResizeToFit property in Grid. In that, Column width is set automatically based on the content or header text which is large. Please refer to the following Help documentation for more information,
Regards,
Venkatesh Ayothiraman.