OK, this is what I need:
I need to do some complex calculations every time when user edits any cell of two of the specific Columns. Let's Say User can edit Columns A and B, but C is read only and calculated by my custom function.. C is also designed like this
template: kendo.template("<span class='columnC'></span>")
OK, I need to loop through all of the A and B columns every time when any of those cells is edited..
My problem is that if I do it on "save" event, when I loop through the dataSource.view() elements I got the old value for the cell which user just edited.. I assume that this is because the dataSource is not synced yet with the user input.. This makes my calculation wrong and it's not acceptable.
If I do it on "change" event it works fine but then it's called too many times unnecessarily and it does stress the client's cpu.
Is there a way under the "save" event to force the dataSource update and then do some things when the new values are stored into dataSource?
I'd like to avoid something like this:
"this.dataSource.getByUid(e.model.uid).set("ColumnA",e.model.ColumnA);"
"this.dataSource.getByUid(e.model.uid).set("ColumnB",e.model.ColumnB);"
as I don't know what is the cell which the user has changed.. ColumnA or ColumnB.. Maybe there is a simple way around this..
Help pls
I need to do some complex calculations every time when user edits any cell of two of the specific Columns. Let's Say User can edit Columns A and B, but C is read only and calculated by my custom function.. C is also designed like this
template: kendo.template("<span class='columnC'></span>")
OK, I need to loop through all of the A and B columns every time when any of those cells is edited..
My problem is that if I do it on "save" event, when I loop through the dataSource.view() elements I got the old value for the cell which user just edited.. I assume that this is because the dataSource is not synced yet with the user input.. This makes my calculation wrong and it's not acceptable.
If I do it on "change" event it works fine but then it's called too many times unnecessarily and it does stress the client's cpu.
Is there a way under the "save" event to force the dataSource update and then do some things when the new values are stored into dataSource?
I'd like to avoid something like this:
"this.dataSource.getByUid(e.model.uid).set("ColumnA",e.model.ColumnA);"
"this.dataSource.getByUid(e.model.uid).set("ColumnB",e.model.ColumnB);"
as I don't know what is the cell which the user has changed.. ColumnA or ColumnB.. Maybe there is a simple way around this..
Help pls