PFA patch which allow user to sort the data in View data mode.
The patch looks good in general, however I'm not sure about the UI, in particular that the closely-linked dialogue for filtering is a completely different design. I think it would be better to combine the Sort/Filter options and use a single dialogue for both, as pgAdmin 3 did (though, maybe not using separate tabs for each part, but the top and bottom of the same dialogue.
That would certainly fix the consistency of the dialogues (obviously, as there would only be one!), and I think would perhaps be a more simple overall UI, particularly for those that want to sort and filter.