This content has been marked as final. Show 3 replies
When you refer to a file, do you mean and PDF, Doc files etc?
If so are they linked to a DB?
The files are an assortment of pdf's, docs, xls etc.
The grid is populated from a SQL database containing the names of the documents but the files are not linked to the database.
I have it working with one file type by hard coding the extension but need to get it to work with multiple file extensions
Can't you put the file extension in the DB as another column? Then when you do the initial query of the files, send the extension column as well. You don't have to display the extensions in the grid, but the grid will hold the information none the less for each file. So when you click the file, merely append the extension on for it.
IE something like
In the grid's onChange() event handler:
filename = MyGrid.selectedItem.FileName + "." + MyGrid.selectedItem.Extension;
The syntax might vary depending on scripting language you are using in your particular code.