Question

I have a Kendo UI grid with quantity and cost columns.

I want to display the total amount (sum of the cost * quantity of each row) I am wanting to get (and display this value) as the user is changing say the quantity. However the grid only update the ViewModel if you click into another cell or off the grid. This is when the change event is fired.

Is there a way of forcing a change/update to the ViewModel on click and keyup anywhere on the grid? (While still keeping focus in the cell the user is editing)

Was it helpful?

Solution

Apply a class to the quantity and cost columns using templates. Then, you can use jquery to capture the keyups to update your viewmodel (Do whatever you do when the change event fires.)

$(".customClassName").keyup(function(){ //same as how you handle 'change' event})

It would help if you had a jsfiddle, but I hope this helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top