cancel
Showing results for 
Search instead for 
Did you mean: 

help with sap.m.P13nSortPanel

Former Member
0 Kudos

Hi,

I am using a P13nSortPanel and i am binding it to a model to fill the items and the sort items. After the sort panel has been changed by either adding a new row or by changing the items, i am not able to get the complete set of data on the sort panel.

i tried oEvent.mParameters.payload.sort which also didnt get me the complete data.

Please help.


Thanks,

Manoj

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Manoj,

If you are using only P13nSortPanel, then try like this -


oEvent.getSource().getAggregation("sortItems");

Check this sample - Plunker, where I am using columns, sort and filter panels and on click of 'OK' in dialog it will alert the first sort item column key and operation. Check the code in App.controller.js - handleClose function. Since, I have used different panels in the dialog. I have used little bit different code, hope you will understand.

Regards,

Sai Vellanki.

Former Member
0 Kudos

Hi Sai,

Thanks for the reply. That did work for me. However, just out of curiosity, i got another way to get it. Do you have any idea, what the difference is? below is my piece of code.

var a=this.getView().byId("sortPanelID")

var conditions = a._getConditions().

a._getConditions() gives met an array of column key and condition. Any inputs?

Thanks,

Manoj

saivellanki
Active Contributor
0 Kudos

Hi Manoj,

Both can be used. But difference will be with ._getConditions() you will get hold of the condition values that are set to the sortItem. With .getAggregation("sortItems")  you will get hold of full item.

Regards,

Sai Vellanki.

Answers (2)

Answers (2)

0 Kudos

Please Try:oEvent.getSource()._getConditions()

karthikarjun
Active Contributor
0 Kudos

Hi Manoj,

Will this help? https://jsbin.com/moyaqomefa/edit?html,output

refered from : https://github.com/SAP/openui5/issues/605

Thanks,

Karthik A

Former Member
0 Kudos

Hi Karthik,

Thanks for the reply. I have gone through those links but none helps me.

Manoj