on 01-27-2015 3:08 PM
Hi Team,
I'm trying to apply a filter programmatically via java script:
press : function() {
sap.ui.table.Column ... .setFilterValue("CH");
sap.ui.table.Column ... .setFiltered(true);
}
this code adds the filter "CH" to the column, but the table is not filtered/updated. Which function do I have to call?
In other words, where is the "apply" filter function? And is this function placed on the table or on the column?
Thanks and regards,
Tobi
Hi Tobias,
Update the table bind with the filter. Something like this.
oTable.bindAggregation("items","/path",null,filter);
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your answer oTable.bindAggregation would mean filtering via the oData Model, but I would like to use the SAPUI5 Control instead.
And there are no errors, the code so far is right and does what it is supposed to do, only the next step for "apply" is missing. Via the Browser, just hitting return in the filter windows is exactly what is missing via javascript:
Window:
there is
https://sapui5.netweaver.ondemand.com/sdk/#docs/api/symbols/sap.ui.table.Table.html#filter
takes Column and value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what error do you see in the console? Does the odata triggers a filter request in the network trace?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
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.