Scenario I am having a grid of product details which on Edit opens up a pop-up comprising of that record details. All fields are readonly except the quantity field. Hence, when I increase or decrease the quantity the price column should reflected based on the value. So if quantity of 1 is 10 then when I increase the quantity to 2 it should be reflected to 20.
Questions 1) I've studied the editor method a bit, I'll have to use the same method on the quantity column right??
2) How shall I grab the value of the price column and update its value? are there any built in methods like the editor?? How shall I go about??
Following is the JS fiddle which I have prepared. http://jsbin.com/ugeref/3/edit
Thanks!!
- Hardik
Define your
DataSource
as:Where you should add a
total
field that isquantity
timesprice
. NOTE: In addition, I've defined the type of the different fields to let KendoUI know that are number and generate the correct widgets.Then, define the
grid
as:Where I added a
Total
column that uses a template that is the result ofquantity * price
.Each time that you update
quantity
,total
will getupdated
.See you code modified in here