Thanks for your reply ...
Interesting ... The 2 columns model, with 1 hidden not fit to me ... Because I'm having this columns both in the grid. Name is not editable. Now changing itemId, user must to see and item Name in the list ...
Sorry, your sample maybe works only with arrays ...
I tried something in other way. In Php from mysql I'm filling "id": as itemId and "text" : as itemId + itemName .
It return fine . But ... the select isn't seeing "text" dimension ... added picture, it show problem ...
Mine source - simply copied your and changed dimensions name, "id" and "text" :
function autoCompleteEditor( source, di ) {
return function (ui) {
ui.$cell.addClass('ui-front');//so that dropdown remains with input.
//initialize the editor
ui.$editor.autocomplete({
source: source,
position: {
collision: 'flipfit',
within: ui.$editor.closest(".pq-grid")
},
select: function (event, ui2) {
ui.$editor.val( ui2.item.text ); // display the selected text
ui.rowData[di] = ui2.item.id; // save selected id
return false;
},
minLength: 0
}).focus(function () {
//open the autocomplete upon focus
$(this).autocomplete("search", "");
});
}
}
The main difference here, that your source is "ships" array, not php query response ...
Maybe something not understand ?