Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ClientSide Filter on sap.m.table in SAPUI5

Hi All,

     I want to apply client side  sort and filter properties on Table column in XML view.

I am able to achieve in JavaScript view using following code

oTable.addColumn(new sap.ui.table.Column({

                label: new sap.ui.commons.Label({text: "Order Value"}).addStyleClass("tableheader"),

                template: new sap.ui.commons.TextField().bindProperty("value", "OrderValue"),

                sortProperty: "OrderValue",

                filterProperty: "OrderValue",

                width: "auto",flexible: true

            }));

But I am unable to implement in XML views. Could you please help in this...

I am using following code

<Table  headerText="Materials" id="MaterialsTable" >

                  <columns>

             <Column hAlign="Left" id="MaterialNumber" >

              <header >

               <Label text="{i18n>view.Materials.Number}">

               </Label>

              </header>

             </Column>

             <Column demandPopin="true" hAlign="Right" id="MaterialDescription" minScreenWidth="Medium">

              <header>

               <Label text="{i18n>view.Materials.Description}">

               </Label>

              </header>

             </Column>

             <Column demandPopin="true" hAlign="Right" id="MaterialPlant" minScreenWidth="Medium">

              <header>

               <Label text="{i18n>view.Materials.Plant}">

               </Label>

              </header>

             </Column>

            </columns>

                 <items>

                    <ColumnListItem  id="defaultItem" type="Navigation" press="navToItemDetails">

                    <cells>

                        <Text text="{MaterialNum}"/>

                        </cells>

                        <cells>

                        <Text text="{MaterialDesc}"/>

                        </cells>

                        <cells>

                        <Text text="{Plant}"/>

                        </cells>

                    </ColumnListItem>

                </items>

                </Table>

Thanks in Advance...

Tags:
Former Member
Not what you were looking for? View more on this topic or Ask a question