Change Grid cell value without triggering Update event

I have cells in my grid for Quantity, CostEach, and CostTotal. The Quantity and CostEach are stored data from my database, and I have an event handler for the “update” status on the row to do an AJAX post of the data to save to the database. But the CostTotal cell is just a calculated value; when I change the Quantity or CostTotal cell, I want to update the calculated value of the CostTotal cell but I don’t want to trigger the ajax post action tied to the update event on the row. Is there a way to do this?

If there’s a better way to do it, I’d love to hear it, but I figured out a solution right after posting this. I’m setting a variable to true before doing the row update with the calculated value, and in my update event I’m checking if the variable is not true before doing the ajax post.

Annoyingly, this is something I do for change events on forms all the time, and for some reason it just wasn’t coming to mind when dealing with the grid.


Your using semaphore solution is a valid one in this case to divide these scenarios.

1 Like