This is a migrated thread and some comments may be shown as answers.

Initial settings if using a database

3 Answers 43 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Danny
Top achievements
Rank 1
Danny asked on 24 Feb 2012, 05:34 PM
Hi,

I've implemented your sample DBContentProvider so I can store the files and directories in a database. However, I am having issues displaying the directory structure from the database and adding a new directory.

The first three rows are what I've manually set the database to contain
ItemID name ParentID MimeType IsDirectory Size Content
1 ROOT NULL NULL 1 NULL NULL
2 images 1 NULL 1 NULL NULL
3 flowers 2 NULL 1 NULL NULL
6 NewFolder -1  1 0 

How do I get the file explorer to display the first 3 rows of the table above? I've set the following but all it displays is "ROOT/":
RadEditor1.ImageManager.ViewPaths = New String() {"ROOT/"}

Also, when I try and add a new folder, it does, but it does it as it appears on the fourth row of my sample database above. Is that connected to my first issue?

Thanks
Tim Metcalfe

3 Answers, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 29 Feb 2012, 12:12 PM
Hi Tim,

In the provided table definition I noticed a slight difference according to the DataBase that is used for the custom DBContentProvider from the following CodeLibrary:
Connect RadFileExplorer or RadEditor to a SQL databse

The column "name" is lowercase, where in the database used by the provider the corresponding column is "Name" (capital N). Could you please verify that this is the exact table definition? If so, the most possible reason for the experienced issue is that the SQLQuery's fetching the data are throwing an exception because of the difference in the column names. However, this should also affect the CreateNewFolder functionality.

Have you applied any modifications to the content provider or RadEditor? Could you please open a formal support ticket and provide a sample fully runnable project reproducing the problem along with the exact steps that need to be executed?

Regards,
Dobromir
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Danny
Top achievements
Rank 1
answered on 01 Mar 2012, 04:25 PM
Dobromir,

I've modified my database to be uppercase 'n' for the Name column and now it works. Thank you for noticing that.

One problem I'm still having however is that although I can upload files and I can see them in the database, they are not being displayed in the list of items in a directory. All directories that I create are displaying fine but files uploaded to a directory are not. I have reproduced my database below:
ItemID Name ParentID MimeType IsDirectory Size Content upsize_ts
1 ROOT NULL NULL 1 NULL NULL 0x00000000000007D4
2 images 1 NULL 1 NULL NULL 0x00000000000007D5
3 flowers 2 NULL 1 NULL NULL 0x00000000000007D6
14 metcalfe.gif 3 image/gif 0 1611 0x4749463839617E0028 etc. 0x00000000000007E0

Any possible reason for that?

Thanks

Tim
0
Dobromir
Telerik team
answered on 05 Mar 2012, 01:35 PM
Hi Tim,

There can be number of reason why the files are not listed in the control. It might be incorrect implementation of the custom content provider, it might be due to the fact that the file type (gif) is not one of the filetypes set in the SearchPatterns, etc.

However, the provided information is not enough to determine the exact cause of the issue, could you please open formal support ticket and provide sample fully runnable project reproducing the issue so we can examine and debug it locally?

Greetings,
Dobromir
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
FileExplorer
Asked by
Danny
Top achievements
Rank 1
Answers by
Dobromir
Telerik team
Danny
Top achievements
Rank 1
Share this question
or