Dataprocessor: delete all rows in one post

How dataprocessor can be used with clearAll function in order to delete all rows from table?

Assuming that you are using connectors on server side

dp.setUpdateMode("off"); grid.forEachRow(function(id){ grid.deleteRow(id); }); dp.setUpdateMode("cell"); dp.sendData();

Thank you very much!