Are you talking about making the little triangle thingy appear or to set the default sorting?
If the latter, that is set when your grid makes the call to your, say, RpcProxy. In our server side code, we get a FilterPagingLoadConfig object, convert that to a SearchCriteria and pass that along to our business logic and DB routines. This method returns a ListLoadResult object which contains, amongst other things, the SortInfo (which contains the sort direction).
I don't know of a way to automagically make that arrow appear, but it sounds like you found one. The only thing you'll need to do is account for the initial request to the server from the grid for data.
In our case, the initial request from the grid has empty SortInfo so we use that as a smoke screen to discern between the initial and subsequent requests. In our case, however, we do not care about the missing triangle. I would think that good UI design dictates that the first column is sorted by default but clearly, every use case is different.