Hi
Using MVVM techniques I have bound a dropdown list like this (this element is sitting within a Kendo UI mobile View):
<select id="treatmentTypesSelect" name="TreatmentTypes" data-role="dropdownlist" data-bind="source: TreatmentTypes, value: TreatmentTypeId, events: { click: onTreatmentTypeChange}" data-change="onTreatmentTypeChange" data-text-field="name" data-value-field="value" required required data-required-msg="Treatment Type is required"></select>
The function onTreatmentTypeChange is defined in the bound viewModel of the View.
Using the Icenium simulator the onTreatmentTypeChange event is fired and works properly, but once deployed to an android device the event is no longer raised.
I tried changing it to this:
<select id="treatmentTypesSelect" name="TreatmentTypes" data-role="dropdownlist" data-bind="source: TreatmentTypes, value: TreatmentTypeId" data-change="onTreatmentTypeChange" data-text-field="name" data-value-field="value" required required data-required-msg="Treatment Type is required"></select>
But this does not work either.
What is the correct way to bind events (in particular the change event)?
Using MVVM techniques I have bound a dropdown list like this (this element is sitting within a Kendo UI mobile View):
<select id="treatmentTypesSelect" name="TreatmentTypes" data-role="dropdownlist" data-bind="source: TreatmentTypes, value: TreatmentTypeId, events: { click: onTreatmentTypeChange}" data-change="onTreatmentTypeChange" data-text-field="name" data-value-field="value" required required data-required-msg="Treatment Type is required"></select>
The function onTreatmentTypeChange is defined in the bound viewModel of the View.
Using the Icenium simulator the onTreatmentTypeChange event is fired and works properly, but once deployed to an android device the event is no longer raised.
I tried changing it to this:
<select id="treatmentTypesSelect" name="TreatmentTypes" data-role="dropdownlist" data-bind="source: TreatmentTypes, value: TreatmentTypeId" data-change="onTreatmentTypeChange" data-text-field="name" data-value-field="value" required required data-required-msg="Treatment Type is required"></select>
But this does not work either.
What is the correct way to bind events (in particular the change event)?