Ticket T297147
Visible to All Users

ASPxFileManager - It is impossible to select file on the server side when a custom FileSystemProvider is used in certain cases

created 9 years ago

[DevExpress Support Team: CLONED FROM T296133: ASPxFileManager - It is impossible to select file on the server side when a custom FileSystemProvider is used]
I think the sample was a bit different back then when I implemented my provider, because I already don't have those IDs set in my code and I bet I did not remove them from the sample intentionally as I have no idea why they should or should not be assigned. Here's how the methods current look like in my code (in which the selection does not work):
public override IEnumerable<FileManagerFile> GetFiles(FileManagerFolder folder)
   {
     T dbFolderItem = FindDbFolderItem(folder);
     return from fileObj in StorageManager<T, DBManager>.getObjectsFromFolder(dbFolderItem.ID, _dbm, true, null, false)
            select new FileManagerFile(this, folder, fileObj.name);
   }
   public override IEnumerable<FileManagerFolder> GetFolders(FileManagerFolder parentFolder)
   {
     T dbFolderItem = FindDbFolderItem(parentFolder);
     return
         from dbItem in FoldersCache.Values
         where dbItem.IsFolder && dbItem.ParentID == dbFolderItem.ID
         select new FileManagerFolder(this, parentFolder, dbItem.name);
   }
As you see, the provider class is a generic in my case, because I use it for different tables with the same column names. The class definition is:
public class VirtualFileSystemProvider<T> : FileSystemProviderBase where T : class, IVirtualFileSystemEntry, new()
the "name" property I use here is my own property which simply returns file / folder name without any extra logic. The StorageManager<T, DBManager>.getObjectsFromFolder method is my method for retrieving files / folders from a virtual folder. I can provide you with my entire class source if needed, but as I said it has a lot of dependencies on other classes and besides cannot run without a DB.
Nickolay, Software Architect
ClickHelp - Online Documentation Tool
http://clickhelp.co

UPDATED:

Sadly, it's not going to be easy and will take some time, but I'll try. Maybe I'll have to defer this to my next release, though. But anyway I promise I'll do that at some point.
Nickolay, Software Architect
ClickHelp - Online Documentation Tool
http://clickhelp.co

Comments (1)
Sergi (DevExpress) 9 years ago

    Hello Nikolay,

    Please feel free to leave a comment to this ticket once you are able to localize the issue. We will be happy to assist you.

    Answers approved by DevExpress Support

    created 9 years ago (modified 9 years ago)

    The fix from https://www.devexpress.com/Support/Center/Question/Details/T296133 has resolved the problem for me, so this case can be closed.

    Nickolay, Software Architect
    ClickHelp - Online Documentation Tool
    http://clickhelp.co

      Comments (1)
      Lanette (DevExpress Support) 9 years ago

        Hello Nickolay,

        Thank you for sharing your results.
        Let us know if you have further difficulties.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.