Categories | Question details Back To List | ||
Check for marked/unwritten rows Hi guys Is there a way to check for rows that are not yet written to database? What we want to do is use onBeforeUnload(), but not fire it unless there are rows marked with bold (marked as updated but unwritten). Answer posted by dhxSupport on Mar 31, 2009 07:39 Befor sending data to the server array dp.updatedRows contain ID of a rows which should be updated. Answer posted by Support on Mar 31, 2009 07:52 If you need not exact number, but just need to check is all data sent to server , it can be done as dp.getSyncState(); returns true if all data saved, false otherwise Answer posted by Allan Hansen on Apr 02, 2009 02:42 When using updatedRows, I found that when deleting a row that is not updated/written yet, it doesn't seem to remove the row's id from the updatedRows array. Is this true? Answer posted by Support on Apr 02, 2009 06:17 If row was added and deleted before saving data to server side - row will be removed from updatedRows collection, because there is no need for any DB sync. operation. If existing row was updated and deleted, id will stay in updatedRows collection while response from server not received. updatedRows collection stores IDs or all elements which need to be synced with server, it doesn't matter was they really updated or deleted. |