Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141930 | Jan 10,2019 07:23 PM UTC | Jan 23,2019 05:56 AM UTC | ASP.NET Core - EJ 2 | 5 |
![]() |
Tags: DataGrid |
<div>
<ejs-grid id="Grid" actionBegin="begin" toolbar="@(new List<string>() {"Delete" ,"Add", "Update", "Cancel" })" allowPaging="true">
<e-grid-editsettings allowDeleting="true" allowEditing="true" allowAdding="true"></e-grid-editsettings>
<e-grid-columns>
. . . . .
<e-grid-column field="DateStart" headerText="OrderDate" type="dateTime" edit="@(new {create = "created", read = "readd", destroy = "destroyd", write = "writed"})" minWidth="20" maxWidth="500"></e-grid-column>
</e-grid-columns>
</ejs-grid>
</div>
<script>
function begin(args) {
if (args.requestType === 'save') {
// you can also convert date object as ISO string using below method to resolve the problem.
args.data['DateStart'] = ej.data.DataUtil.dateParse.addSelfOffset(new Date(args.data['DateStart'])).toISOString();
}
} |
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.
This page will automatically be redirected to the sign-in page in 10 seconds.