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

Bluetooth Scanner Not Populating Combo Box

5 Answers 43 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 2
Shawn asked on 15 Jul 2015, 02:17 PM

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.

5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 16 Jul 2015, 05:16 AM
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!
 
0
Shawn
Top achievements
Rank 2
answered on 16 Jul 2015, 05:35 AM

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.

0
Plamen
Telerik team
answered on 17 Jul 2015, 04:49 AM
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!
 
0
Shawn
Top achievements
Rank 2
answered on 21 Jul 2015, 08:37 PM

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?

0
Plamen
Telerik team
answered on 22 Jul 2015, 06:12 AM
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!
 
Tags
ComboBox
Asked by
Shawn
Top achievements
Rank 2
Answers by
Plamen
Telerik team
Shawn
Top achievements
Rank 2
Share this question
or