To implement this, you need to add a hidden column to iGrid and populate its cells with the 1,2,3,... values according to the row numbers when you first upload data into your grid. When you need to 'undo sorting', you just sort the grid by this hidden column.