I use MVC with jqxInput autocomplete, and It takes 3-4 s to load it.
The GetKoltseghely action is load very fast, the problem is in the client side.
Here is my code:
var sourceKoltseghely =
{
datatype: "json",
datafields: [
{
name: 'KoltseghelyKod'
}
],
url: "/Koltseghely/GetKoltseghely"
};
var dataAdapterKoltseghely = new $.jqx.dataAdapter(sourceKoltseghely);
function setAutoCompleteKoltseghely(id) {
$(id)
.jqxInput({
height: 25,
source: dataAdapterKoltseghely,
width: 200,
displayMember: "KoltseghelyKod",
valueMember: "KoltseghelyKod",
minLength: 1
});
}
I would like to reuse this control more than once, so I give the control id paramter to the setAutoCompleteKoltseghely function.
Is there any way that the dataAdapterKoltseghely call only once the GetKoltseghely action?