in my viewmodel i have copule of properties nad base on that i wrote computed function.
I am assigning value of my computed function to textbox which is displying NAN as a value on view side
<div class="dx-field">
<div class="dx-field-label">Line Value:</div>
<div class="dx-field-value" data-bind="dxTextBox:{
value: cCall_OrderProductLineValue,
readOnly: true
}"></div>
</div>
What I have tried:
cCall_OrderProductName: ko.observable('New'),
cCall_OrderProductQty: ko.observable(10),
cCall_OrderProductPrice: ko.observable(350),
cCall_OrderProductDiscount: ko.observable(5),
cCall_OrderProductFreeQty: ko.observable(4),
cCall_OrderProductLineValue: ko.computed(function () {
result = parseInt((this.cCall_OrderProductPrice * this.cCall_OrderProductQty) - ((this.cCall_OrderProductPrice * this.cCall_OrderProductQty) * (this.cCall_OrderProductDiscount / 100)));
return result;
}, this),