Author Topic: Regarding rollback of data on Reset changes button click  (Read 1638 times)

rbinbosch

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 10
    • View Profile
Regarding rollback of data on Reset changes button click
« on: September 21, 2019, 06:52:53 pm »
Hi,

I want to reset the changes in the grid to the initial value, and on clicking the reject changes button, it is resetting the editable cell data,
but not the value which came through cellsave function in non editable columns.

How we should reset those columns to the initial value ?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Regarding rollback of data on Reset changes button click
« Reply #1 on: September 23, 2019, 10:13:50 am »
you haven't posted code on how are you making changes in cellSave function.

Any changes made directly in rowData can't be undone/ rollbacked i.e.,

Code: [Select]
rowData.fieldName = value;

Any change which is done with addRow, updateRow or deleteRow method calls can be undone or rollbacked.

Also cellSave is an old way of making changes in other fields of grid, js formulas is the preferred way of creating dependencies in the columns.