on 11-01-2017 9:20 PM
onRowsDeleteButton: function(oEvent) {
this.saveEnbaled();
var oTable = this.getView().byId("invoiceList");
var aSelectedIndices = oTable.getSelectedItems();
var oModel = oTable.getModel();
var aBatchtoDelete = [];
for (var i = 0; i < aSelectedIndices.length; i++) { var oContext = aSelectedIndices[i].getBindingContext().getPath(); oModel.remove(oContext, 'DELETE');
}
}
I did'nt understand what is your requirement exactly. From what I understand, you can create an submit button in the view, an clicking, in the controller, call the remove function in the OData model to delete the table row.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Welcome Sudhakara Reddy B,
What you can do is delete only your row first i.e. donot call your OData CURD methods there. Call the CURD methods on clicking of the submit button. You can view the foll. links for better understanding of the coding part :
https://sapui5.netweaver.ondemand.com/sdk/#/sample/sap.m.sample.ListDeletion/preview
https://blogs.sap.com/2016/10/11/addremove-rows-sap.m.table-quick-reference/
https://gist.github.com/dennisseah/d0981ffd942d4a021f1d
Hope this helps,
Regards.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.