Author Topic: isDirty on Column Values?  (Read 2777 times)

mshapiro

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
isDirty on Column Values?
« on: June 12, 2015, 04:49:21 am »
When using trackModel is it possible to check which column values on a "dirty" row have caused the row to become dirty?  I have a grid with editable and non-editable columns.  If a row is dirty only because a value in a non-editable column has changed then I want to ignore that row and not include it in what I am sending back to the server.  Can this be done with IsDirty or some other method?  Thanks.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6309
    • View Profile
Re: isDirty on Column Values?
« Reply #1 on: June 12, 2015, 04:41:33 pm »
yes, it's possible to check which cells are dirty in a row from name of properties in oldRow in JSON data returned from call to

getChanges ( { format: 'raw' } )

//Format of JSON object returned by this method is as below:           
{
    updateList: [ { rowData: rowData, oldRow: oldRow },... ]   
    addList: [ ]   
    deleteList: [ ]
}

mshapiro

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 35
    • View Profile
Re: isDirty on Column Values?
« Reply #2 on: June 15, 2015, 10:08:11 pm »
Thank you, this is what I was looking for.