PDA

View Full Version : CheckColumn modified / unmodified mark



kchiu
23 Nov 2009, 7:32 PM
Hi,

I'm using Ext.ux.grid.CheckColumn from the examples page to display a boolean field in my grid.

The column cell flags a little red mark when the cell is modified, which is nice. However, the cell remains flagged after it's changed back to its original value (eg. changed back to being ticked).

Is there a way to make the flag disappear if the cell value is changed back to its original value? This would be especially useful to show whether the cell has 'really' changed. (ie. contains a value different to its original)

thanks a lot, cheers.

aconran
24 Nov 2009, 10:47 PM
No, this behavior does not exist out of the box.

This would take a little bit of custom code that checks to see what the old value of a particular field in a record is and removes the dirty flag from the cell.

kchiu
26 Nov 2009, 8:04 PM
Hi,

Thanks a lot for the reply.

Is record.json the correct 'original' object to check against for modifications?

I can't see in the API docs what poperty / function to use to get the record's original value.

I've modified CheckColumn.onMouseDown() to check against the record.json object for modifications, and I can correctly clear the dirty flag now. But I want to avoid using .json if it's a non-public implementation detail.

thanks a lot, cheers.