This is a migrated thread and some comments may be shown as answers.

Auto Complete Not Showing Popup

3 Answers 272 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
HArjit
Top achievements
Rank 1
HArjit asked on 02 Jun 2015, 02:25 PM

Hi there,

 

I have this piece of code 

 

$("#dom_imp_doc_assigned_to").kendoAutoComplete({
        dataTextField: "dom_display_name", // The widget is bound to the "name" field
        dataSource: DOCMAN.USERS,
        valid: false,
        select: function (e) {
            var value = e.item.text()
            var returnOBJ = DOCMAN.USERS.filter(function (obj) {
                return obj.dom_display_name === value
            })[0]
            $('#dom_imp_doc_assigned_to_eid').val(returnOBJ.user_login_name)
            $('#dom_imp_doc_assigned_to_dpt').val(returnOBJ.dom_org_unit)

            this.options.valid = true

        }, dataBound: function (e) {
            console.log(" initAffectedDOCS DataBound ", e.sender.options.dataSource)

        }

    });

 

I get the Popup with the data some times and sometimes I don't get any Popup. Is there any way to find out why and what's causing this to happen. One other thing to note is that locally I have less data like 10-15 values but in production I have around 5000 values. The problem only happens in production.

 

 

3 Answers, 1 is accepted

Sort by
0
Plamen Lazarov
Telerik team
answered on 04 Jun 2015, 10:28 AM

Hi Harjit,

I am not sure what exactly is causing this issue. My suggestion would be to open up the browser's developer tools and check both network and console tabs for any errors. Because there is no popup I suspect there is no data coming.  Since the widget loads large amount of data you may also find interesting the following resources:
1. AutoComplete / Virtualization Demo
2. AutoComplete Virtualization API

Regards,
Plamen Lazarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
HArjit
Top achievements
Rank 1
answered on 04 Jun 2015, 01:43 PM

The issue was traced  when we were loading 5000 records and hence we were seeing the issue. I want to avoid Server Side filtering, is there anyway to virtualize on the client Side ?

 

0
Plamen Lazarov
Telerik team
answered on 08 Jun 2015, 11:17 AM

Hi Harjit,

In this case you could use the virtual configuration option. Please note that you need to specify correct pageSize (formula here). Refer to the example below: 

http://dojo.telerik.com/@c0re/isAJu

However the example above has around 830 items and there is a delay while loading them. The delay will be even bigger when working with 5000 items.

For this reason I recommend using server side filtering.

Regards,
Plamen Lazarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
AutoComplete
Asked by
HArjit
Top achievements
Rank 1
Answers by
Plamen Lazarov
Telerik team
HArjit
Top achievements
Rank 1
Share this question
or