PDA

View Full Version : getModifiedRecords



sfwalter
8 Apr 2007, 4:39 AM
I have noticed a couple issued with getModifiedRecords():

1. getModifiedRecords() is not working for property grids. I have a propertygrid with data in it and then I make a change to one of the values. Calling propertyGrid.getDataSource().getModifiedRecords().length always returns 0

2. On a regular editable grid getModifiedRecords() works for existing data. But if you add any rows with something like: ds.insert() getModifiedRecords() is not updated with the new row.

Has anyone else notice these issues or am I just crazy?

Thanks in advance. Scott.

mystix
8 Apr 2007, 8:28 AM
hi scott,

regarding question (2), as far as i know from digging through the source, getModifiedRecords() only keeps track of modified Records i.e. Records which are in the DataStore and which have had data in one or more of its columns modified. this is useful for undoing changes to existing Records in a DataStore (i.e. by calling the Record's reject() method) or by undoing ALL changes to a DataStore by calling the DataStore's rejectChanges() method.

what getModifiedRecords() doesn't do however is return the list of Records which have been added to / deleted from the DataStore using the insert(), add() or remove() methods. if you're looking to undo an addition / deletion of Records from a DataStore, you'll have to manually keep track of and manipulate the added / deleted rows for now.

i haven't the faintest clue regarding question (1) though 'cos i haven't started fiddling with the the PropertyGrid.

ByteLess
8 May 2009, 9:36 AM
i haven't the faintest clue regarding question (1) though 'cos i haven't started fiddling with the the PropertyGrid.


any1?

how should I get the modifed records in propertygrid?

tryanDLS
8 May 2009, 10:03 AM
Please don't post questions in ancient bug threads. Create a new thread in the appropriate forum.