Skip to Content

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

Sort sap.m.table again

Hello,

i got at question concerning the sap m.table.

I have an application with table with with colummns.

A, B, C, D ,E.

The table is sorted by A.

I have an f4 value help wich allows the user to change the value of  column A.

The colummn contains

HS02

HS06

HS08

HS10

After changing HS02 to HS09

HS09

HS06

HS08

HS10

The table is not sorted by column a anymore.

Is there a way to refresh the sorting /actualize the sorting of the table after the change?

If so how?

Best regards.

Dirk

Tags:
replied

Hi Dirk,

Wherever you have placed the value change logic (make sure your model is also updated with the change value), next to that try something like this -

var oSorter = new sap.ui.model.Sorter("A");               //A is your column name

var oTable = this.getView().byId("oTable");          //Get Hold of table control, if it is not MVC use sap.ui.getCore().byId("oTable")

var oBinding = oTable.getBinding("items");

oBinding.sort(oSorter);

Regards,

Sai Vellanki.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question