Hi,
I have a JSFiddle that does something similar, in liveChange handler i check the value and apply the filter on model.
In your case, you can create a button handler and with a cycle of items aggregation of your table and check the value of the input cell.
handleLiveChange: function (event) { if (event.getParameter("newValue") !== "filter") return; var oRow = event.getSource().getParent(); var filterValue = oRow.getCells()[0].getText(); if (filterValue) { var oFilter = new sap.ui.model.Filter("CustomerID", sap.ui.model.FilterOperator.NE, filterValue); var oTable = this.getView().byId("testTable"); var item = oTable.getItems()[0]; var oItemTemplate = item.clone(); oTable.unbindAggregation("items"); oTable.bindAggregation("items", {path:"/Customers", template:oItemTemplate, filters:[oFilter]}); //oTable.getBinding('items').filter([oFilter]); //event.getSource().setValue(''); } }
Add comment