title: Sorting and filter issue with sap.ui.table.Table
body: <p>I am facing an issue with sorting a <code>sap.ui.table.Table</code> after grouping. Anyone is able to do the sorting after grouping? I have tried several tips from SAP Developer Network (SCN) but it does not work.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;head&gt;
          &lt;title&gt;SAPUI5 Table column sorter demo&lt;/title&gt;
      &lt;/head&gt;
  &lt;script id='sap-ui-bootstrap' type='text/javascript' src='https://sapui5.hana.ondemand.com/resources/sap-ui-core.js' data-sap-ui-libs="sap.m,sap.ui.commons,sap.ui.table,sap.viz" data-sap-ui-theme="sap_bluecrystal"&gt;&lt;/script&gt;
  
  &lt;script id="view1" type="sapui5/xmlview"&gt;
      &lt;mvc:View xmlns:core="sap.ui.core" xmlns:layout="sap.ui.commons.layout" xmlns:mvc="sap.ui.core.mvc" xmlns="sap.ui.commons" xmlns:table="sap.ui.table" controllerName="my.own.controller" xmlns:html="http://www.w3.org/1999/xhtml"&gt;
          &lt;layout:VerticalLayout&gt;
              &lt;Button text="Reset" press="onPress" /&gt;
              &lt;table:Table id="testTable" rows="{/}" enableGrouping="true"&gt;
                  &lt;table:Column sortProperty="abc3" visible="true"&gt;
                      &lt;table:label&gt;
                          &lt;Label text="abc3"&gt;&lt;/Label&gt;
                      &lt;/table:label&gt;
                      &lt;table:template&gt;
                          &lt;Label text="{abc3}"&gt;&lt;/Label&gt;
                      &lt;/table:template&gt;
                  &lt;/table:Column&gt;
                  &lt;table:Column sortProperty="abc2"&gt;
                      &lt;table:label&gt;
                          &lt;Label text="abc2"&gt;&lt;/Label&gt;
                      &lt;/table:label&gt;
                      &lt;table:template&gt;
                          &lt;Label text="{abc2}"&gt;&lt;/Label&gt;
                      &lt;/table:template&gt;
                  &lt;/table:Column&gt;
                   &lt;table:Column sortProperty="abc" visible="true"&gt;
                      &lt;table:label&gt;
                          &lt;Label text="abc"&gt;&lt;/Label&gt;
                      &lt;/table:label&gt;
                      &lt;table:template&gt;
                          &lt;Label text="{abc}"&gt;&lt;/Label&gt;
                      &lt;/table:template&gt;
                  &lt;/table:Column&gt;
              &lt;/table:Table&gt;
          &lt;/layout:VerticalLayout&gt;
      &lt;/mvc:View&gt;
  &lt;/script&gt;
  
  
  &lt;script&gt;
      sap.ui.controller("my.own.controller", {
          onInit: function() {
               var aTableData = [{
                  abc: 1, abc2: "a",abc3: "d"}, {
                  abc: 4, abc2: "b",abc3: "a"}, {
                  abc: 5, abc2: "a",abc3: "a"}, {
                  abc: 2, abc2: "c",abc3: "a"}, {
                  abc: 7, abc2: "g",abc3: "a"}, {
                  abc: 1, abc2: "d",abc3: "a"}, {
                  abc: 11, abc2: "c",abc3: "d"}, {
                  abc: 2, abc2: "d",abc3: "b"}, {
                  abc: 9, abc2: "e",abc3: "d"}, {
                  abc: 10, abc2: "a",abc3: "b"}, {
                  abc: 8, abc2: "f",abc3: "d"}, {
                  abc: 5, abc2: "a",abc3: "d"}, {
                  abc: 7, abc2: "b",abc3: "c"}, {
                  abc: 6, abc2: "a",abc3: "d"}, {
                  abc: 3,abc2: "h",abc3: "d" }];
              var oTableModel = new sap.ui.model.json.JSONModel();
              oTableModel.setData(aTableData);
              var oTable = this.getView().byId("testTable");
              oTable.setModel(oTableModel);
              oTable.sort(oTable.getColumns()[0]);
          },
          onPress: function() {
              var oTable = this.getView().byId("testTable");
              //set group of table and column to false
              oTable.setEnableGrouping(false);
              oTable.getColumns()[0].setGrouped(false);
              var oModel = oTable.getModel();
  
              var oListBinding = oTable.getBinding();
              oListBinding.aSorters = null;
              oListBinding.aFilters = null;
              oModel.refresh(true);
              //after reset, set the enableGroup back to true
              oTable.setEnableGrouping(true);
            oTable.sort(oTable.getColumns()[0]);
            oTable.sort(oTable.getColumns()[1]);
          }
      });
      var myView = sap.ui.xmlview("myView", {
          viewContent: jQuery('#view1').html()
      }); // 
      myView.placeAt('content');
  &lt;/script&gt;
  
  &lt;body class='sapUiBody'&gt;
      &lt;div id='content'&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Sorting on ungrouped columns is not working after grouping as depicted below:</p>
  
  <p><a href="https://i.stack.imgur.com/buANT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/buANT.png" alt="Sort after Group"></a></p>