Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Autocomplete not working with Barcode scanner

$
0
0

I'm using autocomplete for editing column inside the Kendo grid. The idea is when users type barcode or scan barcode in the edit cell, autocomplete will give them list of items containing entered text.

The autocomplete works well when I type barcode by keuboard, but when I use the barcode scanner, it seem they can't detect the change and not call method in read action in server.

I also tried with change event of autocompete and call ajax to the same method in read action. But it said $("#PARTCODE").data("kendoAutoComplete") is undefined. The function is below.

Can you please let me know anyway to make autocomplete works with barcode scanner?

Thanks

  function onPartCodeChange(e)

    {
        debugger;
       

        $.ajax({
            url: "@Url.Action("GetPartCodesFromPartAndSupplier", "Shared")",
            data: { text: e.sender._old },
            dataType: "json",
            type: "POST",
            async: true,
            success: function (myData) {
                debugger;
                if(myData.length==0)
                    {
                          alert("No matching barcode found.");              
                    }
                else
                {
                    
                    $("#PARTCODE").data("kendoAutoComplete").dataSource.data(myData);
                  
                    }
               
            }

        });
      
        }


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>