setGridOrder function

Set or get the ordering of a grid