The user won't experience any difference between the Xpath or default search value set to hidden. Only if you set the search field with a default value to normal, a user will be able to change the filter of the datagrid. If you set the search field to 'read only', the user is aware of the filter on the datagrid.
I prefer to set a Xpath constraint on the datagrid.
The most common way used is setting a Xpath constraint on the datagrid. I've never heard someone before about the other way you described. But I do believe that it works. Technically it doesn't matter because in both ways the datagrid uses Xpath to constraint the set of data. But why would you place an useless search field in your data grid if the data grid has support built-in for your case...