Bluetooth Scanner Not Populating Combo Box

6 posts, 0 answers
  1. Shawn
    Shawn avatar
    43 posts
    Member since:
    Dec 2011

    Posted 15 Jul 2015 Link to this post

    We are using a combo box on an iPad and we have a bluetooth scanner hooked up so the user can either key in the values or scan a barcode.

    When we key in the value from the virtual keyboard no problems.


    When we scan the barcode the value shows up momentarily in the control and then gets cleared out.

    We added a dataBound event which gets fired when typing in through the keyboard, but does not get fired when the blue tooth scanner puts text into the control.

    $("#combobox").kendoComboBox({

         dataTextField: "text",

         dataValueField: "value", 

         filter: "startswith",

         dataSource: data,

         dataBound:getData 

    });


    function getData(e)
    {
         scannedData = this.text();
         console.log(scannedData);
    }

     

    Is there a lower level even we can trap to get the value that temporarily shows up in the control?

    If we can get the value we can save it and repopulate it to the combo box.

  2. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 16 Jul 2015 Link to this post

    Hello,

    In such case you can use the search method of Kendo Combobox as for example I have done in this dojo page.

    Hope this will help you solve the issue.

    Regards,
    Plamen
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Shawn
    Shawn avatar
    43 posts
    Member since:
    Dec 2011

    Posted 16 Jul 2015 in reply to Plamen Link to this post

    I am not sure how this option helps.

     When the data is entered into the field via the bluetooth scanner which acts as a keyboard the dataBound event does not fire.

     We cannot get the value that is entered into the combo.

     It shows up briefly and then gets cleared out.

    We want to know if there is a lower level control that the data is being entered into that we can setup an change event or something so we can grab the data.

     

    Hope that helps clarify our issue.

  5. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 16 Jul 2015 Link to this post

    Hello,

    It seems like the tool is filling the input elements on the page but it is not handling the default built in keydown and keypress events of Kendo Combobox. In such case in order to handle the change in the input you can use the approach from this page.

    Regards,
    Plamen
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  6. Shawn
    Shawn avatar
    43 posts
    Member since:
    Dec 2011

    Posted 21 Jul 2015 in reply to Plamen Link to this post

    Now that we can capture the blue tooth input, there is a side effect.

    The button no longer functions to show the drop down list.

    If we do not have the input event it works great, as soon as we put the input even on the drop down does not show up anymore.

    I assume we need to put something in the input event to handle that?

  7. Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 22 Jul 2015 Link to this post

    Hello,

    The issue may be observed if you initialize two times the combobox -$("#combobox").kendoComboBox() and the second time it is without datasource. Here is the sample dojo page that worked correctly at my side.

    Regards,
    Plamen
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready