I am not sure, how to do it in datagrid, but you can achieve this in datagrid 2 as well as list view,
Then on click you can use a nanoflow and then open the URL.
Hope it helps!
In datagrid (1) you can only have button's on top of the list.
You could configure a generic button on top that takes the selected row as input and based on that input knows how to link to the deeplink.
Within the datagrid2 module, you can have buttons inside the table view .
Updating answer as issue was resolved,
-Wrap your data grid in a data view that returns an object, add a button on grid that accepts the above object.
-Make the button call a microflow that changes the object with deep link of the object from data grid you want and refresh the object.