BoldDesk®Customer service software offering ticketing, live chat, and omnichannel support, starting at $49/mo. for 10 agents. Try it for free.
<div id="FlatGrid"></div>
<script>
var column, flag;
$("#FlatGrid").ejGrid({
dataSource: window.gridData,
----------------------------------------
actionComplete: "complete",
recordDoubleClick : "click",
columns: [
------------------------
{ field: "ShipCountry", headerText: "Ship Country" },
{ field: "ShipCity", headerText: "Ship City" }
],
allowPaging: true
});
function complete(args) {
if (args.requestType == "beginedit" || args.requestType == "add")
{
if (column.field == "ShipCountry" && column.editType == "stringedit" && flag) {
var grid = this._id;
$.ajax({
url: '/Grid/EmployeeID',
type: 'GET',
success: function (data1) {
$("#" + grid + "ShipCountry").ejDropDownList({ dataSource: data1 });
}
});
}
flag = false;
}
}
function click(args) {
if (args.columnName == "Ship Country") {
column = this.getColumnByHeaderText(args.columnName);
flag = true;
}
}
</script> |