Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to delete row in sap ui5 table???

i am try below code but i getting error

controller.js

Delete:function(oEvent)

{

var tbl=sap.ui.getCore().byId("tableId");
var idx = tbl.getSelectedIndex();

     if (idx !== -1) {

       var m = tbl.getModel();

       var data = m.getData();

       var removed = data.splice(idx, 1);

       m.setData(data);

       alert(JSON.stringify(removed[0]) +  'is removed');

     } else {

       alert('Please select a row');

     }}

Tags:
Former Member
replied

Nagaraju,

Plunk Edited: Plunker

Regards,

Sai Vellanki.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question