Skip to Content
0

Filter table doesn't work

Nov 07, 2016 at 11:03 AM

58

avatar image

Hello everyone!

I have one problem with Filter table. Grouping is working but Ascending und Descending don't work....I cannot understand why...

f4.png

This is my code.

    handleConfirm: function(oEvent) {
        var oView = this.getView();
        var oTable = oView.byId("idStats");

        var mParams = oEvent.getParameters();
        var oBinding = oTable.getBinding("items");

        // apply sorter to binding
        // (grouping comes before sorting)
        var aSorters = [];

        if (mParams.groupItem) {
            var sPath = mParams.groupItem.getKey();
            var bDescending = mParams.groupDescending;
            var vGroup = this.mGroupFunctions[sPath];
            aSorters.push(new sap.ui.model.Sorter(sPath, bDescending, vGroup));
        }
        var sPath = mParams.sortItem.getKey();
        var bDescending = mParams.sortDescending;
        aSorters.push(new sap.ui.model.Sorter(sPath, bDescending));
        oBinding.sort(aSorters);
    },

f4.png (49.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers