To add the code needed to override the default status messages, we make use of an ItemDataBound event handler of the DataGrid control. I presume it could also be done in the ItemDataCreated event handler, but I have become so accustomed to using the ItemDataBound event handler over the last few years that I never bothered to try the other event.
In the ItemDataBound event handler, we examine each ListItem created. For sort column headers, we must process the ListItemType of Header. For each ListItemType we are looking at, we must 'know' where the cells are that contain links. Actually, we could just loop through, looking at each control collection, but that's beyond the scope of this discussion. I assume, for pedagogical and practical purposes, that we know where they are. For my example, I'll only process the Header type, but the sample code listed below has a LinkButton in the Item and Alternating Item types, so you can play with that at your leisure.
Once we have a column with a link button, we must override the HTML attributes of the tag that will be created on render. It's important to remember, yet easy to forget, that ASP.NET ultimately renders a combination of HTML and JavaScript from the page and its code-behind. So, all we are ultimately going to do is control the HTML and JavaScript that gets produced.