cancel
Showing results for 
Search instead for 
Did you mean: 

How to delete the selected checkbox record from sap.m.Table in SAPUI5?

former_member198924
Participant
0 Kudos

Hi All,

I have a requirement, I want to delete the particular selected record from the table. I'm using sap.m.Table control. Anyone can you please assist me. can you please give any examples.

maheshpalavalli
Active Contributor
0 Kudos

More information is required like are you using odata or JSON model binding for the table to show the records?

boghyon
Product and Topic Expert
Product and Topic Expert

Please provide an mcve so that we can assist you better

maheshpalavalli
Active Contributor
0 Kudos

Boghyon Hoffmann 😄 😄 I asked and then I asummed and answered 😄 😄 Atleast now I have a link to provide anyone if the information is not enough 😄

Accepted Solutions (0)

Answers (3)

Answers (3)

Joseph_BERTHE
Active Contributor
0 Kudos

Hi,

If you are using OData (but in JSon would be the same logic) delete the record in the model and then refresh the model.

In OData model there is a Remove function : https://ui5.sap.com/#/api/sap.ui.model.odata.v2.ODataModel/methods/remove

Regards,

Joseph

maheshpalavalli
Active Contributor
0 Kudos

You can check the UI5 developer guide API reference.

https://ui5.sap.com/#/api/sap.m.ListBase/getselecteditems/getSelectedItems

Once you get the items, read the context data and call remove method of odata model.

Try and let us know if you get any errors.. you can find many blogs question on this topic.

BR

Mahesh

former_member198924
Participant
0 Kudos

Hi Mahesh,

I'm using odata service. Can you please suggest me.