Initial settings if using a database

4 posts, 0 answers
  1. timmy
    timmy avatar
    38 posts
    Member since:
    Dec 2006

    Posted 24 Feb 2012 Link to this post

    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
  2. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 29 Feb 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. timmy
    timmy avatar
    38 posts
    Member since:
    Dec 2006

    Posted 01 Mar 2012 Link to this post

    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
  5. Dobromir
    Admin
    Dobromir avatar
    1633 posts

    Posted 05 Mar 2012 Link to this post

    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.
Back to Top