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).
the little triangle thing, i know how to get the sort info however when the grid first load, i want it to be able to have it sorted in a certain way by default.
i tried to mess with the store but that caused arrow to appear but wacked the server side sorting.
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.