dependentObservable dependent with each other

24 views
Skip to first unread message

jigjosh

unread,
May 2, 2012, 10:08:49 PM5/2/12
to KnockoutJS
Dear All

I am having following view model
Item , Quantity, Rate and Amout
Now need to give functionally so that if User Enter Rate then Amount
will calculate
amount = Rate * Quantity
if user enter Amount then Rate will Calulate
Rate = Amount/Quantity
Pl help me how to manage this with knockout

Thanks
jignesh

rpn

unread,
May 2, 2012, 10:20:18 PM5/2/12
to knock...@googlegroups.com
This is a good case to use a writeable computed observable ( http://knockoutjs.com/documentation/computedObservables.html#writeable_computed_observables ).

Reply all
Reply to author
Forward
0 new messages