<script type="text/javascript">
$(function () {
$("#Grid").ejGrid({
// the datasource "window.gridData" is referred from jsondata.min.js
dataSource: window.gridData,
allowPaging: true,
actionComplete: function (args) {
if (args.requestType == "beginedit" || args.requestType == "add") {
this.getContentTable().find(".gridform").find("input").attr("autocomplete", "off") // to hide the autoComplete for all the input elements
// to hide autoComplete for specific column input box
var id = this.element.attr("id");
//Grid ID + ColumnName
$("#" + id + "CustomerID").attr("autocomplete", "off");
}
},
editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true },
toolbarSettings: { showToolbar: true, toolbarItems: [ej.Grid.ToolBarItems.Add, ej.Grid.ToolBarItems.Edit, ej.Grid.ToolBarItems.Delete, ej.Grid.ToolBarItems.Update, ej.Grid.ToolBarItems.Cancel] },
columns: [
……………………………………………………………………..
]
});
});
</script> |
function complete(args) {
if(args.requestType == "beginedit" || args.requestType == "add"){
// to hide autoComplete for specific column input box
var id = this.element.attr("id");
//Grid ID + ColumnName
//we have removed the autocomplete for CustomerID column
$("#" + id + "CustomerID").attr("autocomplete", "off");
// if you are using dialog template kindly use the elment id to diable the autocomplete
}
}
|