1

I am trying to use the values in a given column as a hyperlink using Shield UI's Grid. There doesn't appear to be anything on making a value within a column a hyperlink in the documentation.

Does anyone have an idea how to make a hyperlink within the grid?

example:

File_001 (href="\somefolder\File_001.pdf")

File_002 (href="\somefolder\File_002.pdf")

etc...etc...

Don
  • 81
  • 4

1 Answers1

0

You can use the column format option to add custom HTML markup in your cells like this:

columns: [                
    { field: "id", width: "70px", title: "ID" },
    { field: "name", title: "Person Name" },
    { field: "company", title: "Company Name" },
    { 
        field: "email", title: "Email Address", width: "270px", 
        format: function(val) { return '<a href="mailto:' + val + '">' + val + '</a>'; }  
    }
]
Vladimir Georgiev
  • 1,949
  • 23
  • 26