title: Delete Multiple Rows (sap.ui.table.Table)
body: <p>I am working on SAPUI5 Table, I have created a functionality to delete selected rows from the table but when I select to delete more than one rows, it is deleting wrong rows. Although first selected row is deleted correctly, others are not. </p>
  
  <pre><code>fDeleteRow: function(oEvent) {
      var oTable = this.getView().byId("tbl");
      var data = oTable.getModel();
      var selRowCount = oTable._oSelection.aSelectedIndices.length;
      var Flag = false;
      for (var i = 0; i &lt; selRowCount; i++) {
          var rowNum = oTable._oSelection.aSelectedIndices[i];
          data.oData.splice(rowNum, 1);
          data.oData.refresh();
          Flag = true;
      }
      if (Flag) {
          var oModelJson = new sap.ui.model.json.JSONModel();
          oModelJson.setData(data.oData);
          oTable.unbindColumns();
          oTable.unbindRows();
          oTable.setModel(oModelJson);
          oTable.bindRows("/");
      }
  }
  </code></pre>