Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Todor Kazakov on Jul 16, 2009 05:11
open dhtmlx forum
Grid deleteRow() question

Hi,
I am loading data from xml, and then I can choose to delete a given row. But once I hit the save button(dp.sendalldata) the row isn't actually deleted. Is there a way to undelete a row if it is not saved?

Thanks in advance,
Todor Kazakov
Answer posted by dhxSupport on Jul 16, 2009 05:47
The rows will be removed only after synchronizing with the server. You can define custom marking routine which will hide rows instead of striking through them. Please find more information about dhtmlxDataProcessor here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Dataprocesor_usage.html#grid_art_dataprocessor
Answer posted by Todor Kazakov on Jul 16, 2009 06:38
I am asking if I can undelete it, not how to hide it.
Answer posted by dhxSuuport on Jul 16, 2009 09:13
You can use "onBeforeUpdate" dhtmlxDataProcessor event. Event occurs before data sending to the server, occurs for each row. 
Answer posted on Jul 16, 2009 14:10
And this is still not an answer to my question ...
When deleteRow() is executed the row is not actually deleted ... it is just marked as deleted. If I later decide, that I don't want this row to be deleted on the next save, how do I do this?
Is there a function opposite to deleteRow(). For example UNdeleteRow()
How to UNdelete it? I want to select a given row which will be deleted and cancel the action for this row.
Can you understand what I mean?
Answer posted by dhxSupport on Jul 17, 2009 07:46
You can do that using "onBeforeUpdate" DataProcessor event and deny deleting for the necessary row. If row was deleted from the grid (after dataProcessor confirmation) there is no way to restore it.