Help get this topic noticed by sharing it on Twitter, Facebook, or email.

HTML hyperlinks not working grid

I have a database table with a column of html hyperlinks. Example below.



By disabling HTML encoding I can get the link to render properly but actually clicking on the link does not work.

Does anyone have a workaround for a HTML hyperlink displayed in grid?
1 person has
this question
+1
Reply
  • 1
    Accessing files like that is a security issue prevented by most browsers.

    Instead of referencing the file by its file location, reference it by its equivalent web address. (localhost/Rsgstor01/jdrive/CRM_DOCS/a1/0011624)
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • 1
    I believe that directory would need to exist in your inetpub/wwwroot/ location though (unless you can specify IIS to include a different directory?)
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • 1
    I have an app where pdf files of Student Reports can be viewed by the teachers by clicking on a link in the grid.

    All that is stored in the database is the name of the PDF files, no path.

    The actual PDF files are stored on the server in a shared folder (share set to only allow authorised users).

    I added an extra formula field (that I called ReportURL) in the model that creates the full path using syntax similar to this:
    '\\SHCS-DC3\Database\PDF\' + RTRIM(PDFFIleName)

    In the grid I have hidden the ReportURL field.
    For the PDFFileName Field I have put into the Hyperlink Format String:
    _blank:{ReportUrl}

    This works absolutely fine for me although to be fair, this is running on an Intranet site not and Internet site.

    As Adam says, it's unlikely that a Browser will allow a file from a drive to be opened but it will allow a file from the Server and shared folder to be opened. (Assuming that the user has access to the shared folder)

    Hope that helps
    • Thanks. I was aware of the security issues but like your app, my app resides only on an Intranet. I did try something similar by storing the full url in a separate database field and referencing the field in a Hyperlink Format String. I like your idea of the virtual field in the grid better. No modifying the database table required. I will give that a try.

      Thanks again for the info.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated