Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2878

Re: How to delete row in sap ui5 table???

$
0
0

or even more generic approach

 

var oTable = sap.ui.getCore().byId("tableId");

var selectedContexts = oTable.getSelectedContexts(true);

var oModel = oTable.getModel();

var dataNode = oModel.getData()["DATA_NODE"];

 

 

$.each(selectedContexts.reverse(), function (i, item) {

  var i = parseInt(item.getPath().substr(item.getPath().lastIndexOf("/") + 1));

  dataNode.splice(i, 1);

});

 

 

oModel.refresh(true);

 

 

DATA_NODE is the name of attribute bound to items of table


Viewing all articles
Browse latest Browse all 2878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>