cancel
Showing results for 
Search instead for 
Did you mean: 

Table Row Filter

Former Member
0 Kudos

Is it possible to have a filter that excludes rows from a table if one of its characteristics is set.

Basically just want to exclude items in a list that have a inactive flag set in the model

could be like:

bus_no:1

bus_desc: express

inactive: Y

so that row above is excluded from the table but still in the model

Accepted Solutions (0)

Answers (2)

Answers (2)

scott_stefanich
Active Participant
0 Kudos

Hello Bob,

Here's a sample which uses your example, an XML view, and applies the filter on an event.

former_member207744
Contributor
0 Kudos

yes it is possible. Apply filter in bindrows and filter condition should be like this sap.ui.model.FilterOperator.NE.

For more info check api

JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.FilterOperator


var aFilter = [];

aFilter.push( new sap.ui.model.Filter("firstName", sap.ui.model.FilterOperator.NE, "Donald") );

aFilter.push( new sap.ui.model.Filter("lastName", sap.ui.model.FilterOperator.NE, "Luke") );

 

oTable.bindRows({

path: '/clients',

filters: aFilter

});

Check working example here JS Bin - Collaborative JavaScript Debugging</title> <link rel="alternate" type=&q...