There is a slight difference between the targetFragment "header" and "before". But on such a simple control as this there difference isn't relevant. Take a look at how it works here: https://github.com/simonwelsh/silverstripe-framework/blob/3.1/forms/gridfield/GridField.php
Having the ability to configure this is a nice enhancement. Thanks for contributing the pull request.