So, I have an input to determine a currency type and a separate input to enter an amount. I'd like to dynamically change the numerictextbox that accepts the amount to display the symbol reflected in the first input. I can specify a currency symbol fine by using a custom culture on the load of the textbox fine, ala:
var thisculture = kendo.culture();
thisculture.numberFormat.currency.symbol = '¥';
$("#salary").kendoNumericTextBox({
format: "c",
culture: thisculture,
decimals: 3,
});
But if I bind something to the change event of the other input (a combobox in this instance), it removes the currency symbol but doesn't update it:
$('#salarycurrency).data("kendoComboBox").bind('change', function (e) {
console.log('change currency');
var selectedRows = this.select();
var dataItem = this.dataItem(selectedRows[0]);
var newculture = kendo.culture();
newculture.numberFormat.currency.symbol = '$';
$("#salary").kendoNumericTextBox().culture(newculture);
});
Is what I'm trying to do even possible with this control? Thanks.
var thisculture = kendo.culture();
thisculture.numberFormat.currency.symbol = '¥';
$("#salary").kendoNumericTextBox({
format: "c",
culture: thisculture,
decimals: 3,
});
But if I bind something to the change event of the other input (a combobox in this instance), it removes the currency symbol but doesn't update it:
$('#salarycurrency).data("kendoComboBox").bind('change', function (e) {
console.log('change currency');
var selectedRows = this.select();
var dataItem = this.dataItem(selectedRows[0]);
var newculture = kendo.culture();
newculture.numberFormat.currency.symbol = '$';
$("#salary").kendoNumericTextBox().culture(newculture);
});
Is what I'm trying to do even possible with this control? Thanks.