on 06-04-2020 4:09 PM
Hi All,
I am displaying some data in table and had a ComboBox element which has years in a seperate entity set binded to it. initally all the data is displyed in table for the user when a year is selected in the Combobox i am filtering the table data as below .
var oTable = this.getView().byId("idTable");
var oFilter = new sap.ui.model.Filter("Zyear", sap.ui.model.FilterOperator.EQ, this.selYear);
oTable.getBinding("items").filter(oFilter);
here the idTable has 3 key fields in odata and the data is filtered correctly in backend ,but in front end the result is shown differently . for ex. if i select an year 2020 after the filter output in table is showing 2020 and 2021 record .
<Toolbar>
<ComboBox items="{/Year}" id="idComb" selectionChange="OnYear">
<core:Item text="{Zyear}"/>
</ComboBox>
<ToolbarSpacer/>
</Toolbar>
<Table id="idTable" items="{/IT_itemset}">
<columns>
<Column visible="false"><Text text="PO Number"/> </Column>
<Column><Text text="{i18n>Date}"/></Column>
<Column><Text text="{i18n>Year}"/></Column>
</columns>
<ColumnListItem>
<cells>
<Text text="{Ponum}"/>
<Text text="{Zyear}"/>
<Text text="{Date}"/>
</cells>
</ColumnListItem>
How can we active the filter option on this table as both table and combobox are having differnt entitysets binded ,do we need to pass all 3 key fileds on filter .
Thanks,
Pavan
User | Count |
---|---|
77 | |
11 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.