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

Re: live search multiple columns in table

$
0
0

Hi Steve,

 

I have modified the controller file. Please use below and it will work -

 

 

sap.ui.controller("view.Main", {

  

   onInit:function(oEvent){

      var oModel = new sap.ui.model.odata.ODataModel(

       ["http://cors-anywhere.herokuapp.com","http://services.odata.org/V2/Northwind/Northwind.svc/"].join("/")

     );

 

   this.getView().setModel(oModel); 

   },

 

 

onSearch:function(oEvent) {

    var newValue = oEvent.getSource().getValue();

    this.filtering(newValue);

},

 

 

filtering : function(value) {

   var oFilter2 = new sap.ui.model.Filter("ProductName", sap.ui.model.FilterOperator.Contains, value);

   var oBinding = this.byId("table").getBinding("items");

   oBinding.filter(oFilter2);

}

 

 

});  

 

BR.


Viewing all articles
Browse latest Browse all 2794

Trending Articles



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