General Category > Help for ParamQuery Select

autocomplete not working for cell in grid page

(1/1)

infovvk:
i tried grid with col with autocomplete editor,

var autoCompleteEditor = function (ui) {
            var $inp = ui.$cell.find("input");

            //initialize the editor
            $inp.autocomplete({
                appendTo: ui.$cell, //for grid in maximized state.
                source: "/origin/getCustomers",
                selectItem: { on: true }, //custom option
                highlightText: { on: true }, //custom option
                minLength: 0
            }).focus(function () {
                //open the autocomplete upon focus               
                $(this).autocomplete("search", "");
            });
        }

its making call getting response but nothing is shown in cell,
my response is {"data":{"id": "101", "name":abc"},{"id": "101", "name":abc"}}

paramvir:
response should be in this format:


--- Code: ---[{"id": "101", "name":"abc"}, {"id": "102", "name": "def"},..]

--- End code ---

https://api.jqueryui.com/autocomplete/#option-source

Navigation

[0] Message Index

Go to full version