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

Re: How to use custom control in SmartFilterBar and perform query with value in custom control?

$
0
0

Hello,

 

Let look at my example :

rapportFond.png

In your view :

smartTableCtrl.png

In your code:

onBeforeRebindTable: function(oEvent) {  var mBindingParams = oEvent.getParameter("bindingParams");  var oSmtFilter = this.getView().byId("smartFilterBar");  var oSelect = oSmtFilter.getControlByKey("MyOwnFilterField");  var sVariant = oSelect.getSelectedKey();  var newFilter = new sap.ui.model.Filter("Variant", sap.ui.model.FilterOperator.EQ, sVariant );  mBindingParams.filters.push(newFilter);  },

In that way, the first query when you load your page will take in account your custom filters.

 

Regards


Viewing all articles
Browse latest Browse all 8635

Trending Articles



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