Iconics Suite - Listing PDF files from a given directory and displaying the selected PDF in Web Browser Control


This article is to show how to create display with dynamic list of the PDF files from exact directory on your hard drive and how to use web browser control to display those files
PDF files folder
Prepare folder with your PDF files under this path:
c:\PDFs\
Reading list of files (Workbench)
Using Workbench prepare Data Source under any SQL Server Native connection:
Prepare custom query (query as text highlighted below):

Declare @T Table (name nvarchar(256), depth int, isFile int)
Insert @T EXEC xp_dirtree 'c:\PDFs', 2, 1
Select * from @T where name like '%pdf'
Display with list of files and files browser (GraphWorX64)
Create new display in GraphWorX64 and put on it Table control and Web Browser control.
Table control configuration
Open Table control configuration popup and in General Tab change Data Source to just created custom query:
Now go to Runtime Tab and activate Commands on Events.
Next select Row Click event and pick command Set Global Aliases.
As global alias please use this sytax (just put in data input) :

{{x="#pdfpath=C:\PDFs\"+tostring({{@@field.name}})+";"}}
It should look like this:
Apply changes and close configuration popup.
Web Browser control configuration
Click on web browser control and show its properties.
As a Source property put :

{{"<#pdfpath#>"}}
It should look like this:
Now in the runtime when you click on the pdf file name in table it will load pdf file in web browser: