How to read path from database to clienttemplate column on the grid

1 Answer 32 Views
Grid
Tony
Top achievements
Rank 2
Iron
Iron
Iron
Tony asked on 19 Jan 2022, 05:39 PM

Hi guys, im trying to read network path saved in the database to read an image.

i have the path saved as \\TP-amk-camp02\somefolder\somefolder\2022-01-21 \ Data\ in the database. How can i read the network path to display it on the grid?

see below html markup


  columns.Bound(c => c.ThumnailPath).Title("Thumbnailscan").Width(249).Encoded(false).ClientTemplate(
                        "<div style='text-align:left;'>#=FolderGUID ? FolderGUID : '' #  </div> " +
                            "<div id='ExampleBox_#=FolderGUID ? FolderGUID : -1#' data='#=FolderGUID#' class='Example_Box'>" +
                                "<img  class='Example_Image' id='ExampleImage_#=FolderGUID#' src=' " + Url.Content("#:data.ThumnailPath#") + "thumbnails.jpg'/> " +

 

kind regards

Tony

1 Answer, 1 is accepted

Sort by
0
Accepted
Tony
Top achievements
Rank 2
Iron
Iron
Iron
answered on 26 Jan 2022, 05:39 AM

Good day guys,

I have solved this by using a virtual directory.

kind regards

Tony

Tags
Grid
Asked by
Tony
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Tony
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or