you have to implement external sorting as at demosite.
I have actually done this with a custom DataModel.
The key issue here is to implement the Modifiable interface and set restrictions accordingly. I used reflection to get the datatypes of the bound entities.
The modify method of this interface gets two lists as arguments: one for filterFields and one for sortFields. Then just evaluate them and construct your own restrictions.
Maybe that helps a bit.