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