def toggle_sort_order index
        index += 1 # increase by 1, since 0 won't multiple by -1
        # internally, reverse sort is maintained by multiplying number by -1
        @sort_keys ||= []
        if @sort_keys.first && index == @sort_keys.first.abs
          @sort_keys[0] *= -1
        else
          @sort_keys.delete index # in case its already there
          @sort_keys.delete(index*-1) # in case its already there
          @sort_keys.unshift index
          # don't let it go on increasing
          if @sort_keys.size > 3
            @sort_keys.pop
          end
        end
      end
def toggle_sort_order index
        index += 1 # increase by 1, since 0 won't multiple by -1
        # internally, reverse sort is maintained by multiplying number by -1
        @sort_keys ||= []
        if @sort_keys.first && index == @sort_keys.first.abs
          @sort_keys[0] *= -1
        else
          @sort_keys.delete index # in case its already there
          @sort_keys.delete(index*-1) # in case its already there
          @sort_keys.unshift index
          # don't let it go on increasing
          if @sort_keys.size > 3
            @sort_keys.pop
          end
        end
      end
toggle the sort order if given column offset is primary sort key
 Otherwise, insert as primary sort key, ascending.