Update grid.php

See tracker 34042 on joomlacode.org:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=34042&tracker_id=34042

In short: javascript function included form parameter but such is not send by php sort function, which limits the setting of form name/id.