Get column of edited cell

Answered
Simon asked on June 10, 2019

I am trying to let the user edit cells, and I'm using the "datachanged" callback.
I've looked at your example here http://jsfiddle.net/flexmonster/vy78qb4o/.
The problem is that I'm trying to work out which column has been updated in the case that there are multiple columns.
The 'id' returns the row number, but in the example how do we know that it the "Price" column being updated?
For example if I have two columns "Price" and "Quantity" in the example, and I edit the quantity it only tells me:
field: undefined, rowId: 2, new value: 2, previous value: 3
How can I tell if it is the "Price" or "Quantity" being updated?
Thanks,
Simon.
 

4 answers

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster June 11, 2019

Hello Simon,
Thank you for writing to us.
 
The field property is supposed to return the uniqueName of the column. Currently, the data you are looking for is available under the wrong key "Kda". We will add the necessary update to make it work as expected, ETA Jun 18.
 
Please let us know if everything works fine for you.
Regards,
Dmytro

Public
Simon June 11, 2019

Thanks for the quick reponse! This works now using "Kda"

Public
Vera Didenko Vera Didenko Flexmonster June 18, 2019

Hello, Simon,

We are glad to announce that the issue with the datachanged event returning column's uniquename under minified key was fixed.

This is available in the 2.7.8 version of Flexmonster: https://www.flexmonster.com/release-notes/

You are welcome to update the component: https://www.flexmonster.com/doc/updating-to-the-latest-version/ 

Please let us know if everything works fine.

We are looking forward to hearing from you.

Best Regards,

Vera

Public
Simon June 19, 2019

Thanks Vera/Dmytro,
I have tested this version and everything now works as expected. Thanks for the quick update!
Simon.

Please login or Register to Submit Answer