I built a widget that allows you to add predefined xpath filters to data grids and listviews, extending the default search functionality.
you can grab the MPK from the /dist folder on the Github repository. It adds the filter buttons in the search area, so make sure you're showing the search fields on your data grid :)
I hope this helps!
I assume you have an xpath currently that has something like [pastorder=false()] or [not(pastorder)] in it? If so, remove this part of the xpath which should give you a datagrid showing all orders, current and past.
To achieve what you want, add a search attribute for pastorder in the search area of your datagrid, and set the default value to false. The datagrid will then display all current orders by default, but you are able to show past orders or all orders by changing this search attribute in your datagrid.