jqGrid creates column header names using the names in the list colName. Therefore, you can try putting markup directly on this list during grid initialization:
colNames:['<a href="#test">Test</a>', 'Column 2', ... ],
I have not tested this, therefore YMMV. Also keep in mind that there may be usability issues - the user probably expects a click on the header to sort the column.