Hello,
I'm trying to implement a Kendo grid where two cells update each other when changed. I know I could use a calculated column if only one cell was editable and the other was calculated but I'm lost trying to let them both update each other.
I know I could do this with a custom Javascript class and get/set methods, where the set for one updates the other, and vice versa.
For Example, say I want a grid of product prices like so:
SKU Price Discount Sale Price
001 20.00 10% 18.00
002 10.00 20% 8.00
...
And I want both the Sale Price and the Discount to be editable: Editing the Sale price should update the discount to the calculated % of Price, and updating the Discount will calculate a new sale price. Furthermore, let's assume I don't actually need to save the sale price, I'm really only loading from my .Net server Sku, Price, and Discount and would like get() on Sale Price to calculate the value to display, and set() on Sale Price to calculate the new discount for saving when I submit my page.
What is the easiest way to achieve this? Currently I'm defining a Schema in my DataSource and filling it with values then displaying my Grid.