01. .Events(e =>02. {03. e.DataBound("onDetailsGridDataBound");04. e.Edit("onRowEdit");05. e.Save("fieldChanged");06......more grid stuff07. })08. .Editable(editable => { editable.Mode(Kendo.Mvc.UI.GridEditMode.InCell); 09. editable.DisplayDeleteConfirmation("Are you sure you want to delete this line item");10. }) I added an event call on Save to call a javascript function, so I can determine whcih cell the user changed, as I need this in the controller for a calcuation where the changed field takes precedence. However when I used the e.model.set('TriggeringField', 'whateverFieldWaschanged'); this causes the controller to be called twice, which I can't live with as it will cause the back end auditing to log the event twice. When I put in e.PreventDefault in the JS method, then the controller is not called at all. How do I get my controller called just ONCE, AND supply the name of the field that was changed. Nolte as above I am using Incell editing.
1.function fieldChanged(e) {2. var colindex = e.container[0].cellIndex;3. if (colindex==8)4. e.model.set('TriggeringField', 'UnitPrice');5. if (colindex == 9)6. e.model.set('TriggeringField', 'DiscountPercentage');7. 8. }