on 2015 Oct 26 10:31 AM
Hi,
I am trying to use filter but after clicking in button event all the data are coming. It is not filtering any data..
var oModel = this.getView().getModel();
var oIn1 = this.getView().byId("in1").getValue();
var oTable = this.getView().byId("Tab2");
oTable.addColumn(new sap.ui.table.Column({
label : new sap.m.Label({ text : "MaterialNo"}),
template : new sap.m.Text({ text : "{MaterialNo}", filterProperty:aFilter }),
}
));
oTable.addColumn(new sap.ui.table.Column({
label : new sap.m.Label({ text : "SalesOrderNo" }),
template : new sap.m.Text({ text : "{SalesOrderNo}", filterProperty:aFilter }),
}
));
oTable.getBinding("rows").filter([aFilter]);
//Filter values for a certain Sales Number
var aFilter=new sap.ui.model.Filter( "SalesOrderNo", sap.ui.model.FilterOperator.Contains, oIn1) ;
oTable.bindRows({ path: "/MaterialNode", filters: [aFilter], });
}
Thanks..
Hi Anupam,
oTable.addColumn(new sap.ui.table.Column({
label : new sap.m.Label({ text : "MaterialNo"}),
template : new sap.m.Text({ text : "{MaterialNo}", filterProperty:aFilter }),
}
));
aFilter - give your model property name.
Examples are already available here: Table - SAPUI5 Demo Kit
Thanks,
Karthik A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
as you told you are using XML View. but you pasted the code here javascript code.
please check.
any way if you are using xml view. please check this code: SAPUI5 Explored
User | Count |
---|---|
72 | |
9 | |
9 | |
8 | |
8 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.