• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Opening File

New Here ,
Jul 09, 2007 Jul 09, 2007

Copy link to clipboard

Copied

I have a list of documents displayed in a grid and want to be able to open the files (which are stored on the webserver). The files have different file types.
Any help on doing this will be appreciated

Views

368

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Jul 11, 2007 Jul 11, 2007
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 de...

Votes

Translate

Translate
New Here ,
Jul 09, 2007 Jul 09, 2007

Copy link to clipboard

Copied

When you refer to a file, do you mean and PDF, Doc files etc?

If so are they linked to a DB?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 09, 2007 Jul 09, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 11, 2007 Jul 11, 2007

Copy link to clipboard

Copied

LATEST
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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation