Dear all,
After we have upgrade from 16.1.0.37 to 16.2.0.50 all of the grid record can't be retrieved.
The following is our chtml and cs as your reference
chtml file
@{
ViewBag.Title = "Camera";
}
@using Syncfusion.EJ2
@section ControlsSection{
<div class="control-section">
<div style="height : 30px">
<span id='msg'></span>
</div>
<br />
@Html.EJS().Grid("InlineEditing").DataSource(dataManager =>
{
dataManager.Json(ViewBag.dataSource).InsertUrl("/Master/StoreCameraInsert").RemoveUrl("/Master/StoreCameraDelete").UpdateUrl("/Master/StoreCameraUpdate").Adaptor("RemoteSaveAdaptor");
}).Columns(col =>
{
col.Field("CAMERAID").HeaderText("Camera ID").IsPrimaryKey(true).Width("120").ValidationRules(new { required = true }).TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Add();
col.Field("CAMERATYPE").HeaderText("Brand").Width("500").ValidationRules(new { required = true, minLength = 3 }).Add();
col.Field("CREATEBY").HeaderText("Created By").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Add();
col.Field("CREATEAT").HeaderText("Created Date").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Format("{0:yyyy-MM-dd HH:mm:ss}").Add();
col.Field("UPDATEBY").HeaderText("Updated By").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Add();
col.Field("UPDATEAT").HeaderText("Updated Date").TextAlign(Syncfusion.EJ2.Grids.TextAlign.Left).Format("yMd").Add();
}).AllowFiltering().FilterSettings(filter =>
{
filter.Type(Syncfusion.EJ2.Grids.FilterType.Excel);
}).Load("load").AllowSorting().AllowPaging().PageSettings(page => page.PageCount(2)).EditSettings(edit =>
{
edit.AllowAdding(true).AllowEditing(true).AllowDeleting(true).Mode(Syncfusion.EJ2.Grids.EditMode.Normal).ShowDeleteConfirmDialog(true);
}).Toolbar(new List<string>() {
"Add", "Edit", "Delete", "Update", "Cancel"
}).Render()
</div>
<script type="text/javascript">
var dReady = false;
var grid;
var theme;
var dtTime = false;
var isDataBound = false;
var isDataChanged = true;
var intervalFun;
var clrIntervalFun;
var clrIntervalFun1;
var clrIntervalFun2;
var dropSlectedIndex = null;
var stTime;
stTime = performance.now();
function load(args) {
if (window.themeName === "highcontrast") {
document.getElementById("InlineEditing").classList.add("e-hightheme");
}
this.on('data-ready', function () {
dReady = true;
});
}
function startTimer(args) {
clearTimeout(clrIntervalFun);
clearInterval(intervalFun);
dtTime = true;
}
document.getElementById('InlineEditing').addEventListener('DOMSubtreeModified', function () {
if (dReady && stTime && isDataChanged) {
var msgEle = document.getElementById('msg');
var val = (performance.now() - stTime).toFixed(0);
stTime = null;
dtTime = false;
dReady = false;
isDataChanged = false;
msgEle.innerHTML = 'Load Time: ' + "<b>" + val + "</b>" + '<b>ms</b>';
msgEle.classList.remove('e-hide');
}
});
</script>
}
@section ActionDescription{
<div id="action-description">
</div>
}
@section Description{
<div id="description">
</div>
}
cs file
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace BAP.Controllers.Master
{
public partial class MasterController : Controller
{
private StoreCameraService camService = new StoreCameraService();
// GET: Camera
public ActionResult Camera()
{
ViewBag.dataSource = camService.CameraLists.ToArray();
return View();
}
}
}
Please help and advise
KennethT