Custom renderer for column header
Custom renderer for column header

Is there any way to alter HTML rendered for column header?
I need to implement the following:
1. If column is not ordered, display centered header text only (without sorting icon) — I can do this easily via CSS.
2. If column is ordered, display header text and sorting icon all of which is centered as a single block (sorting icon should be placed right after header text) — I cannot do this using CSS since sorting icon is background image.
It would be easy if I could render sorting icon in its own span for example.