I had an interesting idea that worked, and it was just to enable sorting of the headers of several columns (example-multi-column-sort.html), and then after loading the grid, simulate a click () in the header I would like to sort when the grid first appeared ("time" is the name of my column that I sorted). The column heading identifier is calculated similarly to the identifier for the root div of the grid (at least at the moment: 0)):
var gridId = $('#myGrid').attr("class"); gridId = '#'+gridId.replace(" ui-widget","")+'time'; $(gridId).click();
The user can then click on any other column headings that they want, but I just clicked them first.
source share