This is a migrated thread and some comments may be shown as answers.

Triggering changes, auto calculations when editing cells

1 Answer 162 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 21 Feb 2017, 07:02 PM

Hello,

 

I have a grid with a bunch of columns representing numbers. Some columns' data is calculated from other columns. 

Based on other Forum posts, I know that I can bind to the save event of the grid to determine what fields were edited, and what, if any columns' values need to be updated as a result. This works great. However, the save event fires every time I auto calculate a field. So for instance, if I update a column called UnitPrice, that triggers changes in 3 other columns, then my save event is called 4 times.

 

I also learned from the (http://www.telerik.com/forums/set-other-row-cells-values-based-on-selected-dropdownlistitem-in-one-cell#db9NSV81OkuDMlzv0brCgQ)[forums] that I can use dot notation to update the data model without refreshing the grid. This results in allowing me to do all my additional calculations and my grid's save event is called one time. Once I call the refresh method on the grid, I can see my newly calculated values. This is exactly what I want, except that now my columns do not show the little red arrow to show that this cell's value has changed.

 

So my questions are about that little red arrow. What does that little red arrow actually show? Does it show when the grid's data is out of sync with the data source? Does it show if the data source is dirty? How can I make changes to the data model without triggering grid refreshes every time, while also showing on the grid which cells have been updated?

 

 

1 Answer, 1 is accepted

Sort by
0
Boyan Dimitrov
Telerik team
answered on 23 Feb 2017, 03:38 PM

Hello Jeff,

The dirty indicator is a little triangle element (span with some styles applied) which indicates the model was updated. The actual refresh of the Kendo UI Grid removes the dirty indicator, but the data item is still marked as dirty. Still I would suggest to take a look at the Preserve Dirty Indicator in Incell Editing and Client Operations in order to preserve the dirty indicator when grid is refreshed. 

Regards,
Boyan Dimitrov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Jeff
Top achievements
Rank 1
Answers by
Boyan Dimitrov
Telerik team
Share this question
or