Thanks for using Syncfusion support.
Query: “I want to use UTC format, without setting the format property explicitly in every date column.”
From your query, we understand that you need to display the Date object in form of UTC format without defining the Format for all the date column.
We can achieve your requirement using two methods. Kindly refer the below
- In MVC we have given support for Data-Annotation. So the you can assign format to column using Data-Annotation by specifying the [DisplayFormat] in the model class.
Refer the below UG documentation for your reference
Note: Data-Annotation will work only when Grid is rendered using Razor format. It will not work when grid is rendered using tag helper.
- Based on your dataSource, we can achieve your requirement by defining the format for date column in the load event of ejGrid. By making the load event unique for all the Grid you can set format to all date Column without specifying the format for all the columns.
Note: But the above solution will work only for local data.
So kindly share the following details, which help us to Validate the reported issue at our end.
- Share the grid rendering code.
- Share details regarding your dataSource. Whether it is local data or remote data or you using any type of adaptor to bound data to Grid?
Requested details will be helpful for us to achieve your requirement as soon as possible.