Hello
I would like to use a kendoComboBox in a specific way. It might be easier to give you an example than describe what I want:
The kendoComboBox has the following list to choose:
- Enter value
- Choice A
- Choice B
If the user chooses "Choice A" or "Choice B" the behaviour is as it should work in kendoComboBox: The value will be be displayed in kendoComboBox as its chosen. If the user chooses "Enter value" the input field of the kendoComboBox will be enterable and masked for only numeric values like "123". I don't want to transform the kendoComboBox into a kendoMaskedTextBox because the user must be able to choose another entry from the kendoMaskedTextBox. So I tried to use a js class to mask the kendoComboBox: http://digitalbush.com/projects/masked-input-plugin/ This javascript class works fine as long as I don't put a kendoComboBox on the input field. But as soon as the input field turns into a kendoComboBox the masked functionality is ignored. I also can live with the fact that I would make the kendoComboBox readonly after entering anything else than "Enter value".
To give you a better picture my code looks like this:
$(
"#objectcounter"
).kendoComboBox({
dataValueField:
"objectCounterId"
,
dataTextField:
"objectCounterText"
,
select:
function
(e) {
// Get chosen value
var
objectCounter =
this
.dataItem(e.item.index()).objectCounterId;
if
(objectCounter ===
"value"
) {
// Mask textbox on choosing "value"
$(
"#c_objectcounter"
+conditionNumber).mask(
'Z999'
,);
});
}
},
dataSource: activeSource[
"condition"
+conditionNumber].objectCounter
});
Is there a way?
Regards