<script>
function create() {
return $("<input>");
}
function write(args) {
var proxy = args;
var record = args.data;
if (!args.element.closest("#gridEditForm").hasClass("e-waitingpopup"))
args.element.closest("#gridEditForm").ejWaitingPopup();
args.element.closest("#gridEditForm").ejWaitingPopup("show")
$.ajax({
type: "POST",
url: "/Default.aspx/Data2",
dataType: "json",
contentType: 'application/json; charset=utf-8',
success: function (data) {
var dropData = data.d;
args.element.ejAutocomplete({
width: "100%", dataSource: dropData, emptyResultText: 'No hay sugerencias', enableAutoFill: false, highlightSearch: true, allowFiltering: true, filterType: "Contains", fields: { text: "text", key: "value" },
multiColumnSettings: {
enable: true, showHeader: true,
stringFormat: "{0}",
width: "1000",
searchColumnIndices: [0, 1],
columns: [
{ "field": "Descripcion", "headerText": "Descripción" },
]
},value: proxy.rowdata.ShipCity,highlightSearch: true, watermarkText: "Select Product Code"
});
}
});
}
function read(args) {
args.ejAutocomplete('suggestionList').css('display', 'none');
return args.ejAutocomplete("getValue");
}
</script> |