An Xpath constraint is a constraint you put on a database query, but when you use an association from a certain other entity, the data could also just be in memory. So you can't put an xpath constraint on an association source.
What you can do is create a microflow as the source and retrieve the objects yourself over the association of the other entity with a retrieve activity. Then you can filter the objects you want to see in the grid with the 'filter' list operation.
Note that the filter operation can only perform 'equals' comparisons, if you need something complex you could iterate over the list and change it however you want.
Or if you don't need the objects in memory, use the database as a source. You could then add this to your xpath constraint:
(if the orderline entity is being retrieved and the order entity is the dataview object)
You can only use XPath in the grid's properties if you use the Database as source for the data grid. Try to change the type of datasource from Association to Database.