How to order a tree grid view by items that are related to the context items?

オフライン

I'm trying to order the items on a Query Definition by keyed name. The problem I'm having is that the items are related to a relationship ItemType, which is the context item on this query definition. This context item is unmapped, so the user only sees the source items of this relationship ItemType. Trying to order these items by keyed name using the Query Builder doesn't seem to work because of the context item. So I added a foreign property to the context item, which is referencing the keyed name of its source item, and tried to order by that in Query Builder. But there's no change in the order. However, if I order the context item by its source_id, it does seem to display the items in this order. This leads me to believe that you cannot order a Tree Grid View by a foreign property of the Query Def's context item, but you can if the property is not foreign. My question is how can I order the results of the Tree Grid View by an item's keyed name if it is only related to the context item of the Query Definition?