To enable sorting of rows on the client side (“client side” means that grid will do this in your browser without using any help from the server) you need to define sorting type for each column in grid using mygrid.setColSorting(sortTypesStr); method, where sortTypesStr is a list of types. There are four types available plus “na” - which means that sorting is not available for the column:
For example, we are going to sort the first column as string (str), the second as number (int) and set no sorting for the third one. In this case we need to add the following line of code before mygrid.init();
mygrid.setColSorting("str,int,int");
Now you can click on the column header and sort the rows in grid according to the sorting types you've just specified. You can find out about "custom sorting".
If you run the page now and click on the last column header grid should look like this: