Disable sorting in relationship grid

Hello community, 

Does anybody know if it's possible to disable the sorting of a few columns in a relationship grid? 

My guess is that the change should be done somewhere in the CodeTree, but I'm not sure where.

Thank you in advance.

Parents Reply Children
  • 0 オフライン in reply to AngelaIp

    I have a NULL relationship and except the "Order by", I don't see any other option related to sorting. The goal is to disable the custom sorting. In other words, if the user wants to sort by the column "Pos", he should be able to do it, but if he wants to sort by "Name", it shouldn't be possible.

  • Ah ok, you want to prevent custom sorting completely. Why? It shouldn´t do much harm.

    Not sure if what you want to achieve is possible. You can prevent editing of cells, but I don´t think you can prevent sorting.

    You maybe can try to overwrite the aria-sort attribute that is used for the column header cells. But there are right now no good Method options available to do Method/Function overwrites in relationships.

    "onLoad" Form Method may work a bit, but will probably be overwritten again when users refresh the relationships.

    Take a look at aria-sort in core.js, searchGrid.js or _Builder.js in codetree. These are parts of the sorting feature, but changes in these files would apply to all ItemTypes.