This question is locked. New answers and comments are not allowed.
Hi,
I have a grid which I've declared using inCell editing
.Editable(editing => editing.Mode(GridEditMode.InCell))
In my sample function below, I calculate a billable value using the Markup entered by the user. But how do I then get that billable value to show up in the grid cell?
Thanks for any help!
Chris
I have a grid which I've declared using inCell editing
.Editable(editing => editing.Mode(GridEditMode.InCell))
When the user modifies one value in the grid, I'd like to catch that event and use that value to update another item in the grid - and have that show up on the grid. I don't actually want to save any of these values to the server until the user hits submitChanges() - so the save gets interrupted using a preventDefault().
In my sample function below, I calculate a billable value using the Markup entered by the user. But how do I then get that billable value to show up in the grid cell?
function InvoiceCommitmentsGrid_onSave(e) { var values = e.values; var markup = parseFloat(values.Markup) / 100; var cost = parseFloat(values.InvoiceCostAmount); var billable = cost + (cost * markup); var dataItem = e.dataItem; dataItem.InvoiceBillableAmount = billable; e.preventDefault(); }Thanks for any help!
Chris