$("#Grid").ejGrid({
dataSource: datasource,
allowPaging: false,
allowScrolling: true,
scrollSettings: { frozenColumns: 1 },
editSettings: { allowEditing: true },
columns: columns,
actionComplete: function (arg) {
if (arg.action == "edit" && arg.requestType == "save")
{
// Do the save
}
}
});I found a work around. If I set the number of frozen columns to 2 then the save event fires fine. I just added a hidden column and included it in the frozen column count setting.
I modified your sample a bit to where I could again duplicate the problem:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Essential Studio for JavaScript : Default Functionalities</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta charset="utf-8" />
<link rel='nofollow' href="15.3.0.26/external/bootstrap.css" rel="stylesheet" />
<link rel='nofollow' href="//cdn.syncfusion.com/15.3.0.33/js/web/flat-azure/ej.web.all.min.css" rel="stylesheet" />
<link rel='nofollow' href="15.3.0.26/themes/web/content/default.css" rel="stylesheet" />
<link rel='nofollow' href="15.3.0.26/themes/web/content/default-responsive.css" rel="stylesheet" />
<link rel='nofollow' href="//cdn.syncfusion.com/15.3.0.29/js/web/responsive-css/ej.responsive.css" rel="stylesheet" />
<!--[if lt IE 9]>
<script src="//cdn.syncfusion.com/js/assets/external/jquery-1.10.2.min.js"></script>
<![endif]-->
<!--[if gte IE 9]><!-->
<script src="//cdn.syncfusion.com/js/assets/external/jquery-3.1.1.min.js"></script>
<!--<![endif]-->
<script src="//cdn.syncfusion.com/js/assets/external/jquery.easing.1.3.min.js"></script>
<script src="//cdn.syncfusion.com/js/assets/external/jquery.globalize.min.js"></script>
<script src="15.3.0.26/scripts/web/jsondata.min.js"></script>
<script src="//cdn.syncfusion.com/js/assets/external/jsrender.min.js"></script>
<script type="text/javascript" src="//cdn.syncfusion.com/15.3.0.33/js/web/ej.web.all.min.js"></script>
<script src="15.3.0.26/scripts/web/properties.js" type="text/javascript"></script>
</head>
<body>
<div id="Grid"></div>
<script type="text/javascript">
$("#Grid").ejGrid({
dataSource: window.gridData,
allowPaging: false,
allowScrolling: true,
scrollSettings: { frozenColumns: 1 },
editSettings: { allowEditing: true },
columns: [
{ field: "CustomerID", headerText: "Customer ID", isPrimaryKey: true, allowEditing: false, template: "<img class='img-circle gain-loss-photo' src='/Profile/GetProfilePictureById?id={{:CustomerID}}' alt='' /> {{:CustomerID}}"},
{ field: "Freight", headerText: "Freight", textAlign: ej.TextAlign.Right, editType: ej.Grid.EditingType.Numeric, width: 80, editParams: { decimalPlaces: 2 }},
{ field: "ShipCity", headerText: "Ship City"},
{ field: "ShipName", headerText: "Ship Name", width: 250}
],
actionComplete: function (arg) {
if (arg.action == "edit" && arg.requestType == "save")
{
alert("save request type triggered");
}
}
});
</script>
</body>
</html>
|
$("#Grid").ejGrid({
. . .
columns: [
{ field: "CustomerID", headerText: "Customer ID", width:100, isPrimaryKey: true, template: "<span>{{:CustomerID}}</span>"},
. . .
],
}); |
Thanks! That was the key to fixing it.