Hello,
this functionality is intended to be used when displaying documents from content tree by default. I.e. when table returned by specified query contains 'NodeAliasPath' and 'DocumentUrlPath' columns it generates URL in according to value in these columns automatically.
You can optionally create '
copy' of this web part and modify gridItems_ItemDataBound method in its code-behind to ensure links that you need.
Best Regards,
Martin Dobsicek