cancel
Showing results for 
Search instead for 
Did you mean: 

ClientSide Filter on sap.m.table in SAPUI5

Former Member
0 Kudos

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...

Accepted Solutions (0)

Answers (1)

Answers (1)

santhu_gowdaz
Active Contributor
0 Kudos