2

I have a list which contains a column containing a URL. When viewing this list using the Datashseet view, I want the URL to open up in a separate or targeted window, so as to not redirect away from the Datasheet view. I'm not seeing any options to control Datasheet view URL rendering. Is there a way to do this? This is for SP2010 Server.

3

Follow these steps to accomplish your requirement:

  1. Create a column of type "Hyperlink or Picture" for your list (if it doesn't already exist)
  2. Add an item to the list with a valid URL in the new hyperlink column
  3. Open the list's "All Items" view in SharePoint Designer (SPD)
  4. Highlight the field containing the hyperlink and click "Code" (switches from Design to Code view)
  5. You will see something like this:

    <a href="{$url}"><xsl:value-of select="$url" /></a>

  6. Change that line to this:

    <a href="{$url}" target="_blank"><xsl:value-of select="$url" /></a>

  7. Save the view you have edited in SPD
  8. Return to the browser and refresh your page (with the list on it) and test

This will work for any subsequent list items added. Works in both standard and datasheet view.

Note that if you create a new view, you will need to make the same modification to that view in SPD for this to work.

| improve this answer | |
  • Phil, in datasheet view - do You press Ctrl+Click on these links?.. I tried to test in datasheet, but links are clickable only with Ctrl. I'm trying to get simple clickable link in Datasheet, maybe You can help?.. sharepoint.stackexchange.com/questions/248402/… – Gennady G Sep 5 '18 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.