Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3280

How to delete row in sap ui5 table???

$
0
0

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');

     }}

 

 

 

del.png


Viewing all articles
Browse latest Browse all 3280

Trending Articles



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