Skip to Content
0

Delete row from table using oDataModel

Feb 14, 2017 at 08:28 PM

97

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers