I've set up a grid that has the autoCompleteEditor from the demos. When I change a value in the form isDirty is not true? Any help would be appreciated. Some snippets of code I'm using are below. I don't know if dataIndx has anything to do with it in the colModel - but if I add it, the value no longer displays in the grid.
//define custom editors
var autoCompleteEditor = function (ui) {
//debugger;
var $cell = ui.$cell,
rowData = ui.rowData,
dataIndx = ui.dataIndx,
width = ui.column.width,
cls = ui.cls;
var dc = $.trim(rowData[dataIndx]);
var userindex = '';
switch (dataIndx) {
case 2:
userindex = arr1;
break;
case 3:
userindex = arr2;
break;
}
var $inp = $("<input type='text' name='" + userindex + "' class='" + cls + " pq-ac-editor' />")
.width(width - 6)
.appendTo($cell)
.val(dc);
$inp.autocomplete({
source: (userindex),
minLength: 0
}).focus(function () {
//open the autocomplete upon focus
$(this).data("autocomplete").search($(this).val());
});
}
JSON data
{"COLUMNS":["RESOURCEID","RESOURCENAME","SIMULATORNAME","SIMULATORGROUP"],"DATA":[[624," Ambulance 502 Bravo (A502B)",null,"Federal Response","Fire Department Unit"],[594,"AFD Foam Unit",null,"Fire","Fire Department Unit"]...
colModel: [
{ title: "Resource ID", dataType: "integer", editable: false },
{ title: "Resource Name", width: 150, dataType: "string",
validations: [
{ type: 'minLen', value: 1, msg: "Required" },
{ type: 'maxLen', value: 255, msg: "length should be <= 255" }
]
},
{ title: "Simulator", width: 150,
editor: {
type: autoCompleteEditor
}
},
{ title: "Simulator Group", width: 150,
editor: {
type: autoCompleteEditor
}
}
],