Skip to Content

Delete row from table using oDataModel

Hi,
i need to delete a row from a table (sap.m.Table). For the bind aggregation, i am using oDataModel, retrieving data from backend.

I want to temporarily remove data from table and after pressed save button, remove permanently from backend.


oDataModel has the "remove" method, but remove permanently.

Removing data temporarily i've tried using:
this.getModel().deleteCreatedEntry("/my_key") and this.getView().byId("table").removeItem("myItem")

At first glance it works fine, but, when i checked changes using hasPendingChanges(), before send to backend, i found no changes.

Using JSONModel can remove data temporarily, but i would like to use oDataModel. All of others methods are done using oDataModel and changing to JSONModel i will need do it again.

Is it possible?

Thanks and regards,
Guilherme

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers